Skip to content

Instantly share code, notes, and snippets.

@aytch
Created March 24, 2013 03:27
Show Gist options
  • Select an option

  • Save aytch/5230363 to your computer and use it in GitHub Desktop.

Select an option

Save aytch/5230363 to your computer and use it in GitHub Desktop.
Basic Script for Office365 performance
#script to log into the BPOS environment
$LiveCred = Get-Credential
#Create a connection to the cloud-based organization using the following command.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
#Load the Exchange cmdlets on the local computer using the following commands:
Import-PSSession $Session
# Your script goes here
# Close and End the Remote Session
Get-PSSession $Session | Remove-PSSession
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment