New-​Azure​Rm​Api​Management​User

Registers a new user.

Syntax

New-AzureRmApiManagementUser
   -Context <PsApiManagementContext>
   -Email <String>
   -FirstName <String>
   -LastName <String>
   [-Note <String>]
   -Password <String>
   [-State <PsApiManagementUserState>]
   [-UserId <String>]
   [<CommonParameters>]

Description

The New-AzureRmApiManagementUser cmdlet registers a new user.

Examples

Example 1: Register a new user

PS C:\>New-AzureRmApiManagementUser -Context $apimContext -FirstName "Patti" -LastName "Fuller" -Email "Patti.Fuller@contoso.com" -Password "qwerty"

This command registers a new user named Patti Fuller.

Required Parameters

-Context

Specifies a PsApiManagementContext object.

Type:PsApiManagementContext
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Email

Specifies the email address of the user.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-FirstName

Specifies the first name of the user. This parameter must be 1 to 100 characters long.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-LastName

Specifies the last name of the user. This parameter must be 1 to 100 characters long.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Password

Specifies the user password. This parameter is required.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Note

Specifies a note about the user. This parameter is optional. The default value is $Null.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-State

Specifies the user state. This parameter is optional. The default value of this parameter is $Null.

Type:PsApiManagementUserState
Parameter Sets:Active, Blocked
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-UserId

Specifies the user ID. This parameter is optional. If this parameter is not specified, this cmdlet generates a user ID.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUser