Tip: You can identify mandatory parameters in different ways :
Get-Help
1 |
Get-Help -Name New-ADUser |
Show-Command
1 |
Show-Command -Name New-ADUser |
Get-Command
1 |
((Get-Command -Name New-ADUser).ParameterSets).Parameters | Where-Object -FilterScript {$_.IsMandatory -eq 1} |
WhatIf
The -WhatIf parameter is used in this case only because New-ADUser is a cmdlet modifying the system state (it does modify objects).
This parameter is not available with Get-ADUser for example because it performs only read operations.
ISESteroids