Thursday, September 19, 2013

Connect Office 365 using Windows PowerShell from your local computer


Connect Office 365 using Windows PowerShell from your local computer
1.             Click Start, point to All ProgramsàAccessoriesàWindows PowerShellàWindows PowerShell.
             (assumption you already run the Set-ExecutionPolicy RemoteSigned command)
2.             Run the following command:
$LiveCred = Get-Credential
 
 
3.             In the Windows PowerShell Credential Request window, type the credentials of an account in your Office 365 organization. Then, click OK.
4.             Run the following command:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection
 
                  

5.             Run the following command:
Import-PSSession $Session
 
 
 
 
 
6.             To disconnect Windows PowerShell from the Office 365 service
When you're finished disconnect Windows PowerShell by running the below command:
                Remove-PSSession $Session
 
 
Note:-If you close the Windows PowerShell window without disconnecting from the Office 365 session, your connection will remain open for 15 minutes. Your account can have only three concurrent connections to the Office 365 session at one time.

1 comment:

  1. you should have more on ITsupport @ https://www.itsuupport.com

    ReplyDelete