Connect to all Office 365 services in a single Windows PowerShell window
For all online PowerShell commands
https://technet.microsoft.com/en-us/library/dn568015.aspx
for exchange online use the following
## Exchange
Import-Module MSOnline
$O365Cred = Get-Credential
$O365Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection
Import-PSSession $O365Session
Connect-MsolService -Credential $O365Cred
For SharePoint online use the following
##Sharepointonline
Set-ExecutionPolicy RemoteSigned
$credential = Get-Credential
Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
Connect-SPOService -Url https://domainhost-admin.sharepoint.com -credential $credential
Leave a Reply