You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/exchange-eop/connect-to-exchange-online-protection-powershell.md
+35-13Lines changed: 35 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -9,18 +9,18 @@ ms.topic: article
9
9
ms.service: eop
10
10
localization_priority: Normal
11
11
ms.assetid: 054e0fd7-d465-4572-93f8-a00a9136e4d1
12
-
description: "Use remote PowerShell to connect to an Exchange Online Protection organization"
12
+
description: "Use remote PowerShell to connect to a standalone Exchange Online Protection (EOP) organization without mailboxes in Exchange Online."
13
13
---
14
14
15
15
# Connect to Exchange Online Protection PowerShell
16
16
17
-
Exchange Online Protection PowerShell allows you to manage your Exchange Online Protection organization from the command line. You use Windows PowerShell on your local computer to create a remote PowerShell session to Exchange Online Protection. It's a simple three-step process where you enter your Office 365 credentials, provide the required connection settings, and then import the Exchange Online Protection cmdlets into your local Windows PowerShell session so that you can use them.
17
+
In standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes, standalone EOP PowerShell allows you to manage your EOP organization from the command line. You use Windows PowerShell on your local computer to create a remote PowerShell session to EOP. It's a simple three-step process where you enter your Microsoft 365 credentials, provide the required connection settings, and then import the EOP cmdlets into your local Windows PowerShell session so that you can use them.
18
18
19
19
## What do you need to know before you begin?
20
20
21
21
- Estimated time to complete: 5 minutes
22
22
23
-
-Exchange Online Protection PowerShell is only used in *standalone* EOP organizations (for example, you have a standalone EOP subscription to protect your on-premises email environment). If you have an Office 365 subscription that includes EOP (E3, E5, etc.), you don't use Exchange Online Protection PowerShell; the same features are available in [Exchange Online PowerShell](../exchange-online/exchange-online-powershell.md).
23
+
-The instructions in this topic are for organizations without Exchange Online mailboxes (for example, you have a standalone EOP subscription to protect your on-premises email environment). If you have a Microsoft 365 subscription that includes Exchange Online mailboxes, the same features are available in [Exchange Online PowerShell](../exchange-online/exchange-online-powershell.md).
24
24
25
25
- You can use the following versions of Windows:
26
26
@@ -40,20 +40,42 @@ Exchange Online Protection PowerShell allows you to manage your Exchange Online
40
40
41
41
<sup>\*</sup> This version of windows has reached end of support, and is now only supported when running in Azure virtual machines. To use this version of Windows, you need to install the Microsoft .NET Framework 4.5 or later and then an updated version of the Windows Management Framework: 3.0, 4.0, or 5.1 (only one). For more information, see [Installing the .NET Framework](https://go.microsoft.com/fwlink/p/?LinkId=257868), [Windows Management Framework 3.0](https://go.microsoft.com/fwlink/p/?LinkId=272757), [Windows Management Framework 4.0](https://go.microsoft.com/fwlink/p/?LinkId=391344), and [Windows Management Framework 5.1](https://aka.ms/wmf5download).
42
42
43
-
- Windows PowerShell needs to be configured to run scripts, and by default, it isn't. You'll get the following error when you try to connect:
43
+
- Windows PowerShell needs to be configured to run scripts, and by default, it isn't. You'll get the following error when you try to connect:
44
44
45
-
> Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.
45
+
> Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.
46
46
47
-
To require all scripts that you download from the internet are signed by a trusted publisher, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you open by selecting **Run as administrator**):
47
+
To require all scripts that you download from the internet are signed by a trusted publisher, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you open by selecting **Run as administrator**):
48
48
49
-
```PowerShell
50
-
Set-ExecutionPolicy RemoteSigned
51
-
```
49
+
```PowerShell
50
+
Set-ExecutionPolicy RemoteSigned
51
+
```
52
+
53
+
- Windows Remote Management (WinRM) needs to be enabled (it's not enabled by default in Windows 7, 8.1 and 10). To enable it, run this command **in a Command Prompt**:
54
+
55
+
```dos
56
+
winrm quickconfig
57
+
```
58
+
59
+
- WinRM needs to allow Basic authentication (it's enabled by default). We don't send the username and password combination, but the Basic authentication header is required to transport the session's OAuth token, since the client-side WinRM implementation has no support for OAuth.
60
+
61
+
To verify that Basic authentication is enabled for WinRM, run this command **in a Command Prompt**:
62
+
63
+
```dos
64
+
winrm get winrm/config/client/auth
65
+
```
66
+
67
+
If you don't see the value `Basic = true`, you need to run this command to enable Basic authentication for WinRM:
68
+
69
+
```dos
70
+
winrm set winrm/config/client/auth @{Basic="true"}
71
+
```
72
+
73
+
If Basic authentication for WinRM is disabled, you'll get this error when you try to connect:
52
74
53
-
You need to configure this setting only once on your computer, not every time you connect.
75
+
> The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration. Change the client configuration and try the request again.
54
76
55
77
> [!TIP]
56
-
> Having problems? Ask for help in the Exchange forums. Visit the forums at: [Exchange Server](https://go.microsoft.com/fwlink/p/?linkId=60612), [Exchange Online](https://go.microsoft.com/fwlink/p/?linkId=267542), or [Exchange Online Protection](https://go.microsoft.com/fwlink/p/?linkId=285351).
78
+
> Having problems? Ask for help in the [Exchange OnlineProtection](https://go.microsoft.com/fwlink/p/?linkId=285351) forum.
57
79
58
80
## Connect to Exchange Online Protection
59
81
@@ -75,7 +97,7 @@ Exchange Online Protection PowerShell allows you to manage your Exchange Online
75
97
76
98
- For Office 365 Germany, use the _ConnectionUri_ value: `https://ps.protection.outlook.de/powershell-liveid/`
77
99
78
-
- For Exchange Online Protection subscriptions that are Exchange Enterprise CAL with Services (includes data loss prevention (DLP) and reporting using web services), use the _ConnectionUri_ value: `https://outlook.office365.com/powershell-liveid/`
100
+
- For on-premises Exchange organization with Exchange Enterprise CAL with Services licenses, use the _ConnectionUri_ value: `https://outlook.office365.com/powershell-liveid/`
79
101
80
102
3. Run the following command:
81
103
@@ -100,7 +122,7 @@ If you receive errors, check the following requirements:
100
122
101
123
- To help prevent denial-of-service (DoS) attacks, you're limited to three open remote PowerShell connections to your Exchange Online Protection organization.
102
124
103
-
- TCP port 80 traffic needs to be open between your local computer and Office 365. It's probably open, but it's something to consider if your organization has a restrictive Internet access policy.
125
+
- TCP port 80 traffic needs to be open between your local computer and Microsoft 365. It's probably open, but it's something to consider if your organization has a restrictive Internet access policy.
104
126
105
127
- The account you use to connect to Exchange Online Protection PowerShell must be represented as a [mail user in EOP](https://docs.microsoft.com/microsoft-365/security/office-365-security/manage-mail-users-in-eop) (created manually or by directory synchronization). If the account is not visible in the Exchange admin center (EAC) as a mail user at **Recipients**\>**Contacts**, you'll receive the following error when you try to connect:
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell.md
+21-18Lines changed: 21 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,13 @@ description: "Learn how to use remote PowerShell to connect to Exchange Online."
17
17
18
18
# Connect to Exchange Online PowerShell
19
19
20
-
Exchange Online PowerShell allows you to manage your Exchange Online settings from the command line. You use Windows PowerShell on your local computer to create a remote PowerShell session to Exchange Online. It's a simple three-step process where you enter your Office 365 credentials, provide the required connection settings, and then import the Exchange Online cmdlets into your local Windows PowerShell session so that you can use them.
20
+
> [!NOTE]
21
+
> We recommend that you use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell. For instructions, see [Use the Exchange Online PowerShell V2 module](../exchange-online-powershell-v2/exchange-online-powershell-v2.md).
22
+
23
+
Exchange Online PowerShell allows you to manage your Exchange Online settings from the command line. You use Windows PowerShell on your local computer to create a remote PowerShell session to Exchange Online. It's a simple three-step process where you enter your Microsoft 365 credentials, provide the required connection settings, and then import the Exchange Online cmdlets into your local Windows PowerShell session so that you can use them.
21
24
22
25
> [!IMPORTANT]
23
-
> If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, you need to download and use the Exchange Online Remote PowerShell Module. For more information, see [Connect to Exchange Online PowerShell using multi-factor authentication](mfa-connect-to-exchange-online-powershell.md). <br/><br/> If you're a standalone Exchange Online Protection (EOP) customer (for example, you're using EOP to protect your on-premises email environment), use the connection instructions in [Connect to Exchange Online Protection PowerShell](../../exchange-eop/connect-to-exchange-online-protection-powershell.md). If your standalone EOP subscription is Exchange Enterprise CAL with Services (includes data loss prevention (DLP) and reporting using web services), the connection instructions in this topic will work for you.
26
+
> If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, you need to download and use the Exchange Online Remote PowerShell Module. For more information, see [Connect to Exchange Online PowerShell using multi-factor authentication](mfa-connect-to-exchange-online-powershell.md). <br/><br/> If you're a standalone Exchange Online Protection (EOP) customer (for example, you're using EOP to protect your on-premises email environment), use the connection instructions in [Connect to Exchange Online Protection PowerShell](../../exchange-eop/connect-to-exchange-online-protection-powershell.md). If your on-premises Exchange organization has Exchange Enterprise CAL with Services licenses, EOP is one of the included services, and the connection instructions in this topic will work for you.
24
27
25
28
## What do you need to know before you begin?
26
29
@@ -54,33 +57,33 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
54
57
Set-ExecutionPolicy RemoteSigned
55
58
```
56
59
57
-
You need to configure this setting only once on your computer, not every time you connect.
58
-
59
-
- Windows Remote Management (WinRM) on your computer needs to allow Basic authentication (it's enabled by default). To verify that Basic authentication is enabled, run this command **in a Command Prompt**:
60
-
61
-
> [!NOTE]
62
-
> WinRM is not enabled by default on Windows 7, 8.1 and 10. To enable it, you should run the "winrm quickconfig" command in a Command Prompt.
60
+
- Windows Remote Management (WinRM) needs to be enabled (it's not enabled by default in Windows 7, 8.1 and 10). To enable it, run this command **in a Command Prompt**:
63
61
62
+
```dos
63
+
winrm quickconfig
64
64
```
65
+
66
+
- WinRM needs to allow Basic authentication (it's enabled by default). We don't send the username and password combination, but the Basic authentication header is required to transport the session's OAuth token, since the client-side WinRM implementation has no support for OAuth.
67
+
68
+
To verify that Basic authentication is enabled for WinRM, run this command **in a Command Prompt**:
69
+
70
+
```dos
65
71
winrm get winrm/config/client/auth
66
72
```
67
73
68
74
If you don't see the value `Basic = true`, you need to run this command to enable Basic authentication for WinRM:
69
75
70
-
```
76
+
```dos
71
77
winrm set winrm/config/client/auth @{Basic="true"}
72
78
```
73
79
74
-
If Basic authentication is disabled, you'll get this error when you try to connect:
80
+
If Basic authentication for WinRM is disabled, you'll get this error when you try to connect:
75
81
76
-
`The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration. Change the client configuration and try the request again.`
82
+
> The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration. Change the client configuration and try the request again.
77
83
78
84
> [!TIP]
79
85
> Having problems? Ask for help in the Exchange forums. Visit the forums at: [Exchange Online](https://go.microsoft.com/fwlink/p/?linkId=267542), or [Exchange Online Protection](https://go.microsoft.com/fwlink/p/?linkId=285351).
80
86
81
-
> [!IMPORTANT]
82
-
> On October 13th, 2020 we will retire Basic Authentication for Remote PowerShell (RPS) in Exchange Online.
83
-
84
87
## Connect to Exchange Online
85
88
86
89
1. On your local computer, open Windows PowerShell and run the following command.
@@ -103,7 +106,7 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
103
106
104
107
- For Office 365 Germany, use the _ConnectionUri_ value: `https://outlook.office.de/powershell-liveid/`
105
108
106
-
- For Office 365 Government Community Cloud High (GCC High), use the _ConnectionUri_ value: `https://outlook.office365.us/powershell-liveid/`
109
+
- For Microsoft 365 Government Community Cloud High (GCC High), use the _ConnectionUri_ value: `https://outlook.office365.us/powershell-liveid/`
107
110
108
111
- If you're behind a proxy server, run this command first: `$ProxyOptions = New-PSSessionOption -ProxyAccessType <Value>`, where the _ProxyAccessType_ value is `IEConfig`, `WinHttpConfig`, or `AutoDetect`.
109
112
@@ -136,9 +139,9 @@ If you receive errors, check the following requirements:
136
139
137
140
- The account you use to connect to Exchange Online must be enabled for remote PowerShell. For more information, see [Enable or disable access to Exchange Online PowerShell](../disable-access-to-exchange-online-powershell.md).
138
141
139
-
- TCP port 80 traffic needs to be open between your local computer and Office 365. It's probably open, but it's something to consider if your organization has a restrictive internet access policy.
142
+
- TCP port 80 traffic needs to be open between your local computer and Microsoft 365. It's probably open, but it's something to consider if your organization has a restrictive internet access policy.
140
143
141
-
- If your organization uses federated authentication, and your identity provider (IDP) and/or security token service (STS) isn't publicly available, you can't use a federated account to connect to Exchange Online PowerShell. Instead, create and use a non-federated account in Office 365 to connect to Exchange Online PowerShell.
144
+
- If your organization uses federated authentication, and your identity provider (IDP) and/or security token service (STS) isn't publicly available, you can't use a federated account to connect to Exchange Online PowerShell. Instead, create and use a non-federated account in Microsoft 365 to connect to Exchange Online PowerShell.
142
145
143
146
## See also
144
147
@@ -154,4 +157,4 @@ The cmdlets that you use in this topic are Windows PowerShell cmdlets. For more
0 commit comments