Online PowerShell


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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s