Set-​Azure​Rm​AD​User

Updates an existing active directory user.

Syntax

Set-AzureRmADUser
   [-DisplayName <String>]
   [-EnableAccount <Boolean>]
   [-ForceChangePasswordNextLogin]
   [-Password <String>]
   -UPNOrObjectId <String>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Updates an existing active directory user (work/school account also popularly known as org-id). For more information: https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/users-operations#UpdateUser

Examples

Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Required Parameters

-UPNOrObjectId

The user principal name (e.g. 'someuser@contoso.com') or the objectId of the user for which the properties need to be updated.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

New name to display in the address book for the user. Example-'Alex Wu'.

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

True for enabling the account; otherwise, false.

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

It must be specified only when you are updating the password. Otherwise it will be ignored. It must be specified if the user must change the password on the next successful login (true). Default behavior is (false) to not change the password on the next successful login.

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

New password for the user. It must meet the tenant's password complexity requirements. It is recommended to set a strong password.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf
Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False