Microsoft Office Tutorials and References
In Depth Information
Exchange Online remote Windows PowerShell
Exchange Online remote Windows PowerShell
A majority of Office 365 Windows PowerShell cmdlets are for Exchange Online, and
Windows PowerShell is the recommended approach to managing Exchange. To manage
Exchange Online through remote Windows PowerShell, you first need to establish a new
session. We use the following base script as a template in the Windows PowerShell ISE:
#Base script for managing Exchange Online
Import-Module MSonline
$cred = Get-Credential
Connect-MsolService -Credential $cred
$Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri https://
ps.outlook.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $Session -AllowClobber
#
# <Exchange Online Management cmdlets> #
#
Remove-PSSession $Session
Between the Import-PSSession and Remove-PSSession commands, you can insert the vast
array of remote Windows PowerShell cmdlets for Exchange Online.
Note
A reference to all the available Windows PowerShell cmdlets for Exchange Online is
located at http://help.outlook.com/en-us/exchangelabshelp/dd575549.aspx .
INSIDE OUT
Clear your PSSession
It is important to always clear your session with the Remove-PSSession cmdlet because
there is a maximum of three sessions per logon. Therefore, if you do not clear a session,
you run the risk of running out of sessions and will need to wait for a session to timeout
before you can open a new session.
Search JabSto ::




Custom Search