Topic Last Modified: 2009-10-07
After you have installed and configured Windows PowerShell and Windows Remote Management (WinRM) on your computer, you have to connect the Windows PowerShell on your local computer to Outlook Live to perform tasks in your Outlook Live organization.
When you open Windows PowerShell on your computer, you're in the Windows PowerShell session of your local computer. A session is an instance of Windows PowerShell that contains all the commands that are available to you.
The Windows PowerShell session of your local computer, called the client-side session, only has the basic Windows PowerShell commands available to it. By connecting to Outlook Live, you connect to the Outlook Live server environment, called the server-side session, which contains the Outlook Live commands.
Before you begin
Before you connect, make sure you have the correct version of Windows PowerShell and WinRM installed and configured on your computer. For more information, see Install and Configure Windows PowerShell.
Verify the Outlook Live account you will use to connect is authorized to connect using Windows PowerShell. For more information, see Control Users' Access to Windows Remote Management.
Connect Windows PowerShell on your local computer to Outlook Live
-
Click Start > All Programs > Accessories > Windows PowerShell > Windows PowerShell.
-
Run the following command:
-
In the Windows PowerShell Credential Request window that opens, type the Windows Live ID and password of an Outlook Live account. When you are finished, click OK.
-
Run the following command:Note The AllowRedirection parameter enables Outlook Live organizations all over the world to connect Windows PowerShell to Outlook Live by using the same URL.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
-
Run the following command:
A progress indicator appears that shows the importing of Outlook Live commands into the client-side session of your local computer. When this process is complete, you can run Outlook Live commands.
Disconnect Windows PowerShell from Outlook Live
When you're finished using the Outlook Live server-side session, always disconnect Windows PowerShell from Outlook Live by running the following command:
For example, to disconnect from the server-side session that is defined by the $Session variable, run the following command:
Important If you close the Windows PowerShell window without disconnecting from the server-side session, your connection to Outlook Live will remain open for 15 minutes. Your account can only have three connections to the server-side session at one time.
Need help for specific tasks?
After you've connected to the Outlook Live server-side session, you're ready to perform tasks in Outlook Live. For detailed instructions, see Use Windows PowerShell.
For troubleshooting information, see Windows PowerShell: FAQs for Administrators.