Set-AzureADMSUser
Uppdaterar en användare.
Syntax
Set-AzureADMSUser
-Id <String>
[-DisplayName <String>]
[-CustomSecurityAttributes <Object>]
[-UserPrincipalName <String>]
[<CommonParameters>]
Description
Uppdaterar en användare i Azure Active Directory (AD).
Exempel
Exempel 1
PS C:\> $user = Get-AzureADMSUser -UserPrincipalName TestUser@example.com
PS C:\> $user.DisplayName = 'YetAnotherTestUser'
PS C:\> Set-AzureADMSUser -UserPrincipalName TestUser@example.com -Displayname $user.Displayname
Uppdatera en användare.
Exempel 2
PS C:\> $attributes = @{
Engineering = @{
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
"Project@odata.type" = "#Collection(String)"
Project = @("Baker","Cascade")
}
}
PS C:\> Set-AzureADMSUser -Id dbb22700-a7de-4372-ae78-0098ee60e55e -CustomSecurityAttributes $attributes
Tilldela ett anpassat säkerhetsattribut med ett värde med flera strängar till en användare.
- Attributuppsättning:
Engineering
- Attributet:
Project
- Attributdatatyp: Samling strängar
- Attributvärde:
("Baker","Cascade")
Exempel 3
PS C:\> $attributesUpdate = @{
Engineering = @{
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
"Project@odata.type" = "#Collection(String)"
Project = @("Alpine","Baker")
}
}
PS C:\> Set-AzureADMSUser -Id dbb22700-a7de-4372-ae78-0098ee60e55e -CustomSecurityAttributes $attributes
Uppdatera ett anpassat säkerhetsattribut med ett värde med flera strängar för en användare.
- Attributuppsättning:
Engineering
- Attributet:
Project
- Attributdatatyp: Samling strängar
- Attributvärde:
("Alpine","Baker")
Parametrar
-CustomSecurityAttributes
Anpassade säkerhetsattribut för användaren.
Typ: | Object |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-DisplayName
Anger användarens visningsnamn.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Id
Anger ID för en användare i Azure AD.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-UserPrincipalName
Anger användarens huvudnamn för en användare i Azure AD.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |