您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Set-AzureADUserExtension

Sets a user extension.

Syntax

Set-AzureADUserExtension
   -ObjectId <String>
   -ExtensionName <String>
   -ExtensionValue <String>
   [<CommonParameters>]
Set-AzureADUserExtension
   -ObjectId <String>
   -ExtensionNameValues <System.Collections.Generic.Dictionary`2[System.String,System.String]>
   [<CommonParameters>]

Description

The Set-AzureADUserExtension cmdlet sets a user extension in Azure Active Directory (Azure AD).

Examples

Example 1: Set the value of an extension attribute for a user

PS C:\> $User = Get-AzureADUser -Top 1
PS C:\> Set-AzureADUserExtension -ObjectId $User.ObjectId -ExtensionName extension_e5e29b8a85d941eab8d12162bd004528_extensionAttribute8 -ExtensionValue "New Value"

The first command gets a user by using the Get-AzureADUser cmdlet, and then stores it in the $User variable.

The second command sets the value of the extension attribute that has the specified name to the value New Value. You can get extension attribute names by using the Get-AzureAdExtensionProperty cmdlet.

Required Parameters

-ExtensionName

Specifies the name of an extension.

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

Specifies extension name values.

Type:System.Collections.Generic.Dictionary`2[System.String,System.String]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-ExtensionValue

Specifies an extension value.

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

Specifies the ID of an object.

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