list office 365 service status

#import o365 service

Import-Module O365ServiceCommunications

#sign into office 365 with encrypted password

$mypass = cat C:\scripts\O365Passwd.txt | convertto-securestring
$mycreds = new-object -typename System.Management.Automation.PSCredential -argumentlist “[email protected]”,$mypass

# gather events from the Service Communications API
$MySession = New-SCSession -Credential $mycreds

 

#get o365 service info

Get-SCServiceInfo -SCSession $MySession

#get o365 event info

Get-SCEvent -SCSession $MySession