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-online/connect-to-exchange-online-powershell/mfa-connect-to-exchange-online-powershell.md
+27-25Lines changed: 27 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ description: "Learn how to connect to Exchange Online PowerShell by using multi-
16
16
If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, you can't use the instructions at [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell.md) to use remote PowerShell to connect to Exchange Online. MFA requires you to install the Exchange Online Remote PowerShell Module, and use the **Connect-EXOPSSession** cmdlet to connect.
17
17
18
18
> [!NOTE]
19
-
> • You can't use the Exchange Online Remote PowerShell Module to connect to Exchange Online PowerShell and Security & Compliance Center PowerShell in the same session (window). You need to use separate sessions of the Exchange Online Remote PowerShell Module. <br/>• Delegated Access Permission (DAP) partners can't use the procedures in this topic to connect to their customer tenant organizations in Exchange Online PowerShell. MFA and the Exchange Online Remote PowerShell Module don't work with delegated authentication.
19
+
> • You can't use the Exchange Online Remote PowerShell Module to connect to Exchange Online PowerShell and Security & Compliance Center PowerShell in the same session (window). You need to use separate sessions of the Exchange Online Remote PowerShell Module. <br/>• Delegated Access Permission (DAP) partners can't use the procedures in this topic to connect to their customer tenant organizations in Exchange Online PowerShell. MFA and the Exchange Online Remote PowerShell Module don't work with delegated authentication. <br/>• The Exchange Online Remote PowerShell Module is not supported in PowerShell Core (macOS, Linux, or Windows Nano Server). As a workaround, you can install the module on a computer that's running a supported version of Windows (physical or virtual), and use remote desktop software to connect.
20
20
21
21
## What do you need to know before you begin?
22
22
@@ -42,56 +42,58 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
42
42
43
43
1. In Internet Explorer or Edge, open the Exchange admin center (EAC) for your Exchange Online organization. For instructions, see [Exchange Admin Center in Exchange Online](https://technet.microsoft.com/library/ace44f6b-4084-4f9c-89b3-e0317962472b.aspx).
44
44
45
-
**Note**: A browser that uses ClickOnce to download (like Internet Explorer or Edge) is needed to complete the next step.
45
+
**Note**: A browser that uses ClickOnce to download (like Internet Explorer or Edge) is needed to complete the next step.
46
46
47
47
2. In the EAC, go to **Hybrid** > **Setup** and click the appropriate **Configure** button to download the Exchange Online Remote PowerShell Module for multi-factor authentication.
48
48
49
-

49
+

50
50
51
51
3. In the **Application Install** window that opens, click **Install**.
52
52
53
-

53
+

54
54
55
55
- 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:
56
56
57
-
```
58
-
winrm get winrm/config/client/auth
59
-
```
57
+
```
58
+
winrm get winrm/config/client/auth
59
+
```
60
60
61
-
If you don't see the value `Basic = true`, you need to run this command to enable basic authentication for WinRM:
61
+
If you don't see the value `Basic = true`, you need to run this command to enable basic authentication for WinRM:
62
62
63
-
```
64
-
winrm set winrm/config/client/auth @{Basic="true"}
65
-
```
63
+
```
64
+
winrm set winrm/config/client/auth @{Basic="true"}
65
+
```
66
66
67
-
If basic authentication is disabled, you'll get this error when you try to connect:
67
+
If basic authentication is disabled, you'll get this error when you try to connect:
68
68
69
-
`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.`
69
+
`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.`
70
70
71
71
- When you use the Exchange Online Remote PowerShell Module, your session will end after one hour, which can be problematic for long-running scripts or processes. To avoid this issue, use [Trusted IPs](https://docs.microsoft.com/azure/active-directory/authentication/howto-mfa-mfasettings#trusted-ips) to bypass MFA for connections from your intranet. Trusted IPs allow you to connect to Exchange Online PowerShell from your intranet using the old instructions at [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell.md). Also, if you have servers in a datacenter, be sure to add their public IP addresses to Trusted IPs as described [here](https://docs.microsoft.com/azure/active-directory/authentication/howto-mfa-mfasettings#enable-the-trusted-ips-feature-by-using-service-settings).
72
72
73
73
> [!TIP]
74
-
> 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).
74
+
> 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).
75
75
76
76
## Connect to Exchange Online PowerShell by using MFA
77
77
78
78
1. On your local computer, open the **Exchange Online Remote PowerShell Module** ( **Microsoft Corporation** > **Microsoft Exchange Online Remote PowerShell Module**).
79
79
80
80
2. The command that you need to run uses the following syntax:
This example connects to Exchange Online in Office 365 using the account [email protected].
96
98
97
99
```
@@ -106,16 +108,16 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
106
108
107
109
3. In the sign-in window that opens, enter your password, and then click **Sign in**.
108
110
109
-

111
+

110
112
111
-
A verification code is generated and delivered based on the verification response option that's configured for your account (for example, a text message or the Azure Authenticator app on your mobile phone).
113
+
A verification code is generated and delivered based on the verification response option that's configured for your account (for example, a text message or the Azure Authenticator app on your mobile phone).
112
114
113
115
4. In the verification window that opens, enter the verification code, and then click **Sign in**.
114
116
115
-

117
+

116
118
117
-
>[!NOTE]
118
-
>Be sure to disconnect the remote PowerShell session when you're finished. If you close the Exchange Online Remote PowerShell Module window without disconnecting the session, you could use up all the remote PowerShell sessions available to you, and you'll need to wait for the sessions to expire. To disconnect all currently open PowerShell sessions in the current window, run the following command:
119
+
>[!NOTE]
120
+
>Be sure to disconnect the remote PowerShell session when you're finished. If you close the Exchange Online Remote PowerShell Module window without disconnecting the session, you could use up all the remote PowerShell sessions available to you, and you'll need to wait for the sessions to expire. To disconnect all currently open PowerShell sessions in the current window, run the following command:
0 commit comments