Last active
December 1, 2018 22:13
-
-
Save darrenjrobinson/95cb755720abdb88e84acc667499a969 to your computer and use it in GitHub Desktop.
Goodbye Set-MsolUser, Hello Set-AzureADUser & Azure Graph API. Associated blog post is located here https://blog.darrenjrobinson.com/goodbye-set-msoluser-hello-set-azureaduser-azure-graph-api/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the Module to your PowerShell Session | |
Import-Module AzureADPreview | |
#Connect to your AzureAD tenant | |
Connect-AzureAD | |
# Get a user by UPN | |
$user = Get-AzureADUser -ObjectId "skollegger@live.darrenjrobinson.info" | |
$user | |
# Update the user | |
$user = Set-AzureADUser -ObjectId $user.UserPrincipalName -Department "Diagnostics" -Country "AU" | |
$user = Get-AzureADUser -ObjectId "skollegger@live.darrenjrobinson.info" | |
$user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment