PowerShell: A quick way to view required parameters on a cmdlet

Since PowerShell’s Get-Help command returns objects, not just plain text, it’s possible to filter the returned results.

To view only the required parameters, for example on the New-ADGroup cmdlet, do the following:

Get-Help New-ADGroup -Parameter * | Where-Object {$_.required -eq $true}

The result:


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s