Created
February 22, 2016 12:02
-
-
Save sjwaight/ff7dfc064c14ecf16c46 to your computer and use it in GitHub Desktop.
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
$myEmailOrUpn = 'some.user@some.doman' | |
# can use your mailbox login | |
$cred = Get-Credential | |
$exoSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $cred -Authentication "Basic" -AllowRedirection | |
# Loads session and EXO Cmdlets | |
Import-PSSession $exoSession | |
Get-Mailbox -Identity $myEmailOrUpn | |
Get-MailboxPreferredLocation -Identity $myEmailorUpn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment