Connect-MsolService
New-MsolUser -DisplayName "User Name" -FirstName User -LastName Name -UserPrincipalName username@yourdirectory.onmicrosoft.com
get-msoluser -UserPrincipalName username@yourdirectory.onmicrosoft.com | select *immutableid*
set-MsolUser –UserPrincipalName username@yourdirectory.onmicrosoft.com -ImmutableId "username@domain.tld"
get-msoluser -UserPrincipalName username@yourdirectory.onmicrosoft.com | select *immutableid*
set-MsolUserPrincipalName -UserPrincipalName username@yourdirectory.onmicrosoft.com -NewUserPrincipalName username@domain.tld
get-msoluser -UserPrincipalName username@domain.tld | select *immutableid*
Last active
January 3, 2023 09:39
-
-
Save varunchandak/8d8fe34dbac5c3dc0e8671aacf171683 to your computer and use it in GitHub Desktop.
create permanently delete user in powershell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment