Thursday 4 August 2016

Creating sessions to Exchange Online, Skype for Business Online and SharePoint Online

This blog post is based upon this one from Microsoft, except I have simplified it;

Although the link above, does open up sessions to all of the services from a single window, this allows you to pass commands around, which you cannot do if individual sessions are open.

Exchange Online

$Creds = Get-Credential
$ExchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $Creds -Authentication Basic -AllowRedirection

Import-PSSession $ExchangeSession

Skype for Business Online

Download and install the Skype for Business PowerShell modules;

$Creds = Get-Credential
Import-Module LyncOnlineConnector
$SFB = New-CsOnlineSession -Credential $Creds

Import-PSSession $SFB

SharePoint Online

$Creds = Get-Credential
Connect-SPOService -Url -credential $Creds