Setting Up Windows PowerShell

Applies to: Office 365 with Exchange, User Mailbox

For some tasks related to Office 365 with Exchange, you must use Windows PowerShell 5.x to create a remote PowerShell session to Office 365 with Exchange.

In this procedure, you will do the following:

  • Verify the that Windows PowerShell execution policy is remote signed.

  • If you are using remote PowerShell for the first time, you must run the EnableOrganizationCustomization cmdlet.

  • Run each command once on all the Exchange mailbox access nodes.

Note

We use basic authentication to connect to Office 365 PowerShell.

Procedure

  1. Open Windows PowerShell and create a remote PowerShell session to Office 365 with Exchange.

  2. To verify that the current execution policy is RemoteSigned, run the following cmdlet:

    get-ExecutionPolicy
  3. If the current execution policy is not RemoteSigned, run the following cmdlet:

    set-ExecutionPolicy RemoteSigned
  4. If you have never used a remote PowerShell session before, run the following cmdlet:

    Enable-OrganizationCustomization

    You only need to run this cmdlet once. If you run it again later, you will receive an error.

For more information, see the following Microsoft TechNet articles:

Loading...