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
-
Open Windows PowerShell and create a remote PowerShell session to Office 365 with Exchange.
-
To verify that the current execution policy is RemoteSigned, run the following cmdlet:
get-ExecutionPolicy
-
If the current execution policy is not RemoteSigned, run the following cmdlet:
set-ExecutionPolicy RemoteSigned
-
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.
Related Topics
For more information, see the following Microsoft TechNet articles:
-
"Connect to Exchange Online PowerShell", https://technet.microsoft.com/library/jj984289(v=exchg.160).aspx.
-
"Enable-OrganizationCustomization", https://technet.microsoft.com/en-us/library/jj200665(v=exchg.160).aspx.