Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureADPreview - 'All' parameter of Get-AzureADUser behaves like a "boolean parameter" rather than a "switch parameter" #28

Open
heidarj opened this issue Jun 26, 2021 · 1 comment

Comments

@heidarj
Copy link

heidarj commented Jun 26, 2021

Using the AzureADPreview module, version 2.0.2.136 I notice that the 'All' parameter of Get-AzureADUser behaves like a "boolean parameter" rather than a "switch parameter".

That is to say this:

Get-AzureADUser -All

throws this error:

Get-AzureADUser : Missing an argument for parameter 'All'. Specify a parameter of type 'System.Nullable`1[System.Boolean]' and try again.

The only way to use the 'All' parameter is by providing a boolean value:

Get-AzureADUser -All:$true
@heidarj
Copy link
Author

heidarj commented Jun 26, 2021

Microsoft documentation about "Advanced Function Parameters" states:

Switch parameters are easy to use and are preferred over Boolean parameters, which have a more difficult syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant