Connecting Remote PowerShell Office 365

Connecting Remote PowerShell Office 365

If you are managing Office 365 Exchange hosted mail systems and wish to connect to PS from your PC here are simple steps to get the work done. The remote PowerShell will provide you real easy way to manage your SMTP organization.

In this Example:

Office 365 SMTP domain we will connect too is @messagetalk.onmicrosoft.com and I am going to use my User name which has administrator privileges,odedeal@l@messagetalk.onmicrosoft.com

From administrator PS

  • Open PS with Administrator privileges
$LiveCred = Get-Credential

image

  • Run fallowing command ( don’t make any changes ) copy and paste into PS window.

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

image

  • Next run this PS
Import-PSSession $Session
image

image

Now we are connected we can see our mailboxes etc.

image

If we look from GUI we have same users , we can use GUI to manage these users now as well as PS from our management PC

image

Once we are done we can close the PS session with fallowing PS command

Remove-PSSession $Session

image

Respectfully,
Oz Casey, Dedeal ( MVP north America)
MCITP (EMA), MCITP (SA)
MCSE 2003, M+, S+, MCDST
Security+, Project +, Server +
http://smtp25.blogspot.com/ (Blog)
http://telnet25.wordpress.com/ (Blog)
Leave a Comment
  • Please add 4 and 6 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Maheshkumar S Tiwari edited Original. Comment: Added Tag

Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Maheshkumar S Tiwari edited Original. Comment: Added Tag

Page 1 of 1 (1 items)