Exchange Script – Connect To Office 365 Using PowerShell

This KB will show you how to connect to Office 365 Exchange Online using PowerShell

The requirements for this is Windows 7 SP1 and above or windows Server 2008 R2 and above.

Once done save code below as a .PS1 script:

#Connect 0365
$UserCredential = Get-Credential

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

Import-PSSession $Session

#script end


Once connected run the cmdlet below:

Get-Mailbox | Add-MailboxPermission -User simon-AccessRights fullaccess


Posted

in

, ,

by