Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
In this article, we will explore the usage of the Set-AzADUser cmdlet in PowerShell, specifically in the Windows environment. Set-AzADUser is a powerful command that allows administrators to modify Azure Active Directory (AD) user properties and settings. By understanding its capabilities and learning how to use it effectively, administrators can streamline user management tasks and ensure accurate user information within their Azure environment.
Examples:
Updating User Display Name: To update the display name of a user, use the following command:
Set-AzADUser -DisplayName "John Doe" -UserPrincipalName john.doe@example.com
This command will update the display name for the user with the specified UserPrincipalName.
Modifying User License Assignment: To modify the license assignment for a user, use the following command:
Set-AzADUser -ObjectId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -AssignedLicenses @{"AccountSkuId"="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}
Replace the ObjectId with the user's unique identifier and AccountSkuId with the desired license SKU.
Enabling Multi-Factor Authentication (MFA): To enable MFA for a user, use the following command:
Set-AzADUser -ObjectId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -StrongAuthenticationRequirements @{"RelyingParty"="https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/","State"="Enabled","MethodType"="OneWaySMS"}
Replace the ObjectId with the user's unique identifier. This command enables MFA using One-Way SMS as the authentication method.