Office 365 Powershell access with username change example

$UserCredential = Get-Credential

Enter in 365 admin and credentials when prompted:

image

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic –AllowRedirection

Import-PSSession $Session
image

Connect-msolservice

Enter in 365 admin and credentials when prompted:

image

Username change:

Set-MsolUserPrincipalName -newuserprincipalname newname@yourdomain.com -userprincipalname oldname@yourdomain.com

Credit- https://technet.microsoft.com/en-us/library/hh974317.aspx

Comments

Popular posts from this blog

FRS to DFSR Post Cleanup “File Replication NtFrs Stopped”

Domain Migration SubinACL /Migratetodomain How To:

How to configure HP LaserJet Printer IPsec Encryption