Connect to Sharepoint Online, Skype online or Exchange online via powershell

Following on from my previous post once connected to office365 you can load the modules for the below services using these powershell commands. Please note you will need to have the relevant software installed – see the bottom of the article.

sharepoint online

Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking

Connect-SPOService -Url https://domainhost-admin.sharepoint.com -credential $credential

Note substitute domainhost for your company sharepoint name BUT LEAVE THE -admin IN

skype for business

Import-Module SkypeOnlineConnector

$sfboSession = New-CsOnlineSession -Credential $credential

Import-PSSession $sfboSession

exchange online

$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri “https://outlook.office365.com/powershell-liveid/” -Credential $credential -Authentication “Basic” -AllowRedirection

Import-PSSession $exchangeSession -DisableNameChecking

security & compliance

$ccSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $credential -Authentication Basic -AllowRedirection

Import-PSSession $ccSession -Prefix cc

 

Pre-Requisites

Leave a Reply

Your email address will not be published. Required fields are marked *