Last active
July 14, 2022 11:01
-
-
Save ericphan/318fa577e9fa37a6738b4db935d30d29 to your computer and use it in GitHub Desktop.
This file contains hidden or 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-Module AzureAD | |
| Connect-AzureAD | |
| $adGroupId = "<Azure AD Group Id here>" | |
| $users = Get-AzureADGroupMember -ObjectId $adGroupId | |
| foreach ($u in $users) | |
| { | |
| Write-Host $u.DisplayName | |
| Set-AzureADUser -ObjectId $u.Mail -Department "<New Value to update here>" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment