列出所有以“ reader”结尾的Azure AD组

时间:2018-10-08 09:32:36

标签: azure powershell azure-active-directory azure-powershell

我正在尝试列出显示名称以“读者”结尾的所有天蓝色广告组

Get-AzureRmADGroup -SearchString "Reader"

微软的例子说

Example 2: Get groups by search string
This command gets all Active Directory groups that **include** Patti in the display name.


Windows PowerShell
PS C:\> Get-AzureRmADGroup -SearchString "Patti"

但是当我尝试执行此操作时,我的结果是空白,我想念的是什么?

1 个答案:

答案 0 :(得分:1)

请尝试以下命令。

Get-AzureRmADGroup | Where-Object {$_.DisplayName -like "*Reader"}

测试结果(为了加快操作速度,请使用-First 5,您可以忽略它)

enter image description here