Типа того function Verb-Noun { [CmdletBinding()] Param ( [Parameter(Mandatory=$true, Position=0)] [ValidateNotNullOrEmpty()] [string]$FssoName, # Справочное описание параметра 1 [Parameter(Mandatory=$true, Position=1)] [ValidateSet("External", "Internal")] $Location ) Begin { switch ($Location) { 'External' {$Location = 'OU=EXTERNAL,OU=SSO,OU=Resources,OU=HQ,DC=domain,DC=local'} 'Internal' {$Location = 'OU=INTERNAL,OU=SSO,OU=Resources,OU=HQ,DC=domain,DC=local'} } } Process { if ($pscmdlet.ShouldProcess("Target", "Operation")) { } } End { } }
new-fssoGroup -FssoName testovaya -ou Internal begin: OU=INTERNAL,OU=SSO,OU=Resources,OU=HQ,DC=domain,DC=local Process: Internal End: Internal
Обсуждают сегодня