Get-AzureRmADGroup
篩選 Active Directory 群組。
警告
自 2024 年 2 月 29 日起,AzureRM PowerShell 模組已正式淘汰。 建議使用者從 AzureRM 遷移至 Az PowerShell 模組,以確保持續支援和更新。
雖然 AzureRM 模組可能仍可運作,但不再維護或支援它,但會根據用戶的判斷權和風險放置任何繼續使用。 如需轉換至 Az 模組的指引,請參閱我們的 移轉資源 。
Syntax
Get-AzureRmADGroup
[-ObjectId <Guid>]
[-DefaultProfile <IAzureContextContainer>]
[-IncludeTotalCount]
[-Skip <UInt64>]
[-First <UInt64>]
[<CommonParameters>]
Get-AzureRmADGroup
-DisplayNameStartsWith <String>
[-DefaultProfile <IAzureContextContainer>]
[-IncludeTotalCount]
[-Skip <UInt64>]
[-First <UInt64>]
[<CommonParameters>]
Get-AzureRmADGroup
-DisplayName <String>
[-DefaultProfile <IAzureContextContainer>]
[-IncludeTotalCount]
[-Skip <UInt64>]
[-First <UInt64>]
[<CommonParameters>]
Get-AzureRmADGroup
-ObjectId <Guid>
[-DefaultProfile <IAzureContextContainer>]
[-IncludeTotalCount]
[-Skip <UInt64>]
[-First <UInt64>]
[<CommonParameters>]
Description
篩選 Active Directory 群組。
範例
範例 1 - 列出所有 AD 群組
PS C:\> Get-AzureRmADGroup
列出租使用者中的所有AD群組。
範例 2 - 使用分頁列出所有 AD 群組
PS C:\> Get-AzureRmADGroup -First 100
列出租使用者中的前 100 個 AD 群組。
範例 3 - 依物件識別碼取得 AD 群組
PS C:\> Get-AzureRmADGroup -ObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE
取得對象標識碼為 '85F89C90-780E-4AA6-9F4F-6F268D322EEE' 的 AD 群組。
範例 4 - 依搜尋字串列出群組
PS C:\> Get-AzureRmADGroup -SearchString Joe
列出顯示名稱開頭為 『Joe』 的所有 AD 群組。
參數
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisplayName
群組的顯示名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisplayNameStartsWith
用來尋找開頭為所提供字串的群組。
Type: | String |
Aliases: | SearchString |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-First
要傳回的物件數目上限。
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IncludeTotalCount
報告數據集中的物件數目。 目前,此參數不會執行任何動作。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ObjectId
群組的物件識別碼。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Skip
忽略第一個 N 物件,然後取得其餘的物件。
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |