Get-AzApiManagementUser
取得使用者或使用者。
語法
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實例。
類型: | PsApiManagementContext |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
指定使用者的電子郵件位址。 如果指定此參數,此 Cmdlet 會透過電子郵件尋找使用者。 這個參數是選擇性的。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-FirstName
指定使用者的名字。 如果指定此參數,此 Cmdlet 會依名字尋找使用者。 這個參數是選擇性的。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-GroupId
指定群組識別碼。 如果指定,此 Cmdlet 會尋找指定群組內的所有使用者。 這個參數是選擇性的。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-LastName
指定使用者的姓氏。 如果指定,此 Cmdlet 會依姓氏尋找使用者。 這個參數是選擇性的。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-State
指定用戶狀態。 如果指定,此 Cmdlet 會尋找處於此狀態的使用者。 這個參數是選擇性的。
類型: | Nullable<T>[PsApiManagementUserState] |
接受的值: | Active, Blocked, Deleted, Pending |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-UserId
指定使用者識別碼。 如果指定,此 Cmdlet 會依此標識碼尋找使用者。 這個參數是選擇性的。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | 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]]