Office 365 Powershell access with username change example
$UserCredential = Get-Credential
Enter in 365 admin and credentials when prompted:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic –AllowRedirection
Connect-msolservice
Enter in 365 admin and credentials when prompted:
Username change:
Set-MsolUserPrincipalName -newuserprincipalname newname@yourdomain.com -userprincipalname oldname@yourdomain.com
Credit- https://technet.microsoft.com/en-us/library/hh974317.aspx
Comments
Post a Comment