mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-10 18:57:23 +00:00
22 lines
553 B
PowerShell
22 lines
553 B
PowerShell
function Set-GPOOwner {
|
|
[cmdletBinding()]
|
|
param(
|
|
[validateset('Administrative', 'Default')][string] $Type = 'Default',
|
|
[string] $Principal
|
|
)
|
|
if ($Type -eq 'Default') {
|
|
if ($Principal) {
|
|
@{
|
|
Action = 'Owner'
|
|
Type = 'Default'
|
|
Principal = $Principal
|
|
}
|
|
}
|
|
} elseif ($Type -eq 'Administrative') {
|
|
@{
|
|
Action = 'Owner'
|
|
Type = 'Administrative'
|
|
Principal = ''
|
|
}
|
|
}
|
|
} |