Get-AzApiManagementUser
取得使用者或使用者。
Syntax
Get-AzApiManagementUser
-Context <PsApiManagementContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzApiManagementUser
-Context <PsApiManagementContext>
[-UserId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzApiManagementUser
-Context <PsApiManagementContext>
[-FirstName <String>]
[-LastName <String>]
[-State <PsApiManagementUserState>]
[-Email <String>]
[-GroupId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
如果未指定任何使用者,Get-AzApiManagementUser Cmdlet 會取得指定的使用者或所有使用者。
範例
範例 1:取得所有使用者
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementUser -Context $apimContext
此命令會取得所有使用者。
範例 2:依標識碼取得使用者
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementUser -Context $apimContext -UserId "0123456789"
此命令會依標識碼取得使用者。
範例 3:依姓氏取得使用者
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementUser -Context $apimContext -LastName "Fuller"
此命令會取得具有指定姓氏 Fuller 的使用者。
範例 4:依電子郵件位址取得使用者
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementUser -Context $apimContext -Email "user@contoso.com"
此命令會取得具有指定電子郵件地址的使用者。
範例 5:取得群組內的所有使用者
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementUser -Context $apimContext -GroupId "0001"
此命令會取得指定群組內的所有使用者。
參數
-Context
指定 PsApiManagementContext 的實例。
Type: | PsApiManagementContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
指定使用者的電子郵件位址。 如果指定此參數,此 Cmdlet 會透過電子郵件尋找使用者。 這是選擇性參數。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-FirstName
指定使用者的名字。 如果指定此參數,此 Cmdlet 會依名字尋找使用者。 這是選擇性參數。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-GroupId
指定群組識別碼。 如果指定,此 Cmdlet 會尋找指定群組內的所有使用者。 這是選擇性參數。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-LastName
指定使用者的姓氏。 如果指定,此 Cmdlet 會依姓氏尋找使用者。 這是選擇性參數。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-State
指定用戶狀態。 如果指定,此 Cmdlet 會尋找處於此狀態的使用者。 這是選擇性參數。
Type: | Nullable<T>[PsApiManagementUserState] |
Accepted values: | Active, Blocked, Deleted, Pending |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-UserId
指定使用者識別碼。 如果指定,此 Cmdlet 會依此標識碼尋找使用者。 這是選擇性參數。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
輸入
Nullable<T>[[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUserState, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]