azure-powershell
azure-powershell copied to clipboard
[Doc]: Get-AzAdGroup documentation needs examples for -Filter
Description
This doc doesn't include any filter syntax examples, or even what filtering standards should be applied. Like, does it support "like" filters, or only "eq" filters? What syntax standard is expected, OData 3, PowerShell, etc.?
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadgroup?view=azps-8.3.0
Thanks for reporting. Besides Group, we should provide examples about filter for User, APP as well. In addition, we need to add link below to help user understand more about syntax of filter.
https://docs.microsoft.com/en-us/graph/query-parameters
Thanks to @dingmeng-xue for the link to the higher-level documentation on this param. Agree it should be linked to from any documentation that use the -Filter param.
For those finding this via Google, later on, this worked.
Connect-AzAccount
$filter = "startsWith(DisplayName,'SG_GC')"
$filteredgroups = Get-AzAdGroup -filter $filter
docs and examples updated: https://github.com/Azure/azure-powershell/pull/19647