Skip to content

Commit be41441

Browse files
committed
Merge branch 'master' into InfoBarrier-chrisda
2 parents d590723 + c4f5adb commit be41441

25 files changed

+829
-520
lines changed

exchange/docs-conceptual/exchange-eop/connect-to-exchange-online-protection-powershell.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: "Connect to Exchange Online Protection PowerShell"
33
ms.author: chrisda
44
author: chrisda
5-
manager: serdars
6-
ms.date: 5/9/2018
5+
manager: dansimp
6+
ms.date:
77
ms.audience: Admin
88
ms.topic: article
99
ms.service: eop
@@ -14,18 +14,22 @@ description: "Use remote PowerShell to connect to an Exchange Online Protection
1414

1515
# Connect to Exchange Online Protection PowerShell
1616

17-
Exchange Online Protection PowerShell allows you to manage your Exchange Online Protection settings 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+
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.
1818

1919
## What do you need to know before you begin?
2020

2121
- Estimated time to complete: 5 minutes
2222

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).
24+
2325
- You can use the following versions of Windows:
2426

2527
- Windows 10
2628

2729
- Windows 8.1
2830

31+
- Windows Server 2019
32+
2933
- Windows Server 2016
3034

3135
- Windows Server 2012 or Windows Server 2012 R2
@@ -36,13 +40,13 @@ Exchange Online Protection PowerShell allows you to manage your Exchange Online
3640

3741
<sup>*</sup> For older versions 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).
3842

39-
- 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:
4044

4145
`Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.`
4246

4347
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**):
4448

45-
```
49+
```PowerShell
4650
Set-ExecutionPolicy RemoteSigned
4751
```
4852
@@ -55,15 +59,15 @@ Exchange Online Protection PowerShell allows you to manage your Exchange Online
5559
5660
1. On your local computer, open Windows PowerShell and run the following command:
5761
58-
```
62+
```PowerShell
5963
$UserCredential = Get-Credential
6064
```
6165
6266
In the **Windows PowerShell Credential Request** dialog box, type your work or school account and password, and then click **OK**.
6367
6468
2. Run the following command:
6569
66-
```
70+
```PowerShell
6771
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.protection.outlook.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
6872
```
6973
@@ -75,23 +79,23 @@ Exchange Online Protection PowerShell allows you to manage your Exchange Online
7579
7680
3. Run the following command:
7781
78-
```
82+
```PowerShell
7983
Import-PSSession $Session -DisableNameChecking
8084
```
8185

82-
[!NOTE]
83-
Be sure to disconnect the remote PowerShell session when you're finished. If you close the Windows PowerShell 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 the remote PowerShell session, run the following command:
84-
85-
```
86+
> [!NOTE]
87+
> Be sure to disconnect the remote PowerShell session when you're finished. If you close the Windows PowerShell 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 the remote PowerShell session, run the following command:
88+
89+
```PowerShell
8690
Remove-PSSession $Session
8791
```
8892

8993
## How do you know this worked?
9094

9195
After Step 3, the Exchange Online Protection cmdlets are imported into your local Windows PowerShell session and tracked by a progress bar. If you don't receive any errors, you connected successfully. A quick test is to run an Exchange Online Protection cmdlet, for example, **Get-TransportRule**, and see the results.
92-
96+
9397
If you receive errors, check the following requirements:
94-
98+
9599
- A common problem is an incorrect password. Run the three steps again and pay close attention to the user name and password you enter in Step 1.
96100

97101
- To help prevent denial-of-service (DoS) attacks, you're limited to three open remote PowerShell connections to your Exchange Online Protection organization.
@@ -100,14 +104,14 @@ If you receive errors, check the following requirements:
100104

101105
- The **New-PSSession** command (Step 2) might fail to connect if your client IP address changes during the connection request. This can happen if your organization uses a source network address translation (SNAT) pool that contains multiple IP addresses. The connection error looks like this:
102106

103-
`The request for the Windows Remote Shell with ShellId <ID> failed because the shell was not found on the server. Possible causes are: the specified ShellId is incorrect or the shell no longer exists on the server. Provide the correct ShellId or create a new shell and retry the operation.`
107+
`The request for the Windows Remote Shell with ShellId <ID> failed because the shell was not found on the server. Possible causes are: the specified ShellId is incorrect or the shell no longer exists on the server. Provide the correct ShellId or create a new shell and retry the operation.`
104108

105-
To fix the issue, use an SNAT pool that contains a single IP address, or force the use of a specific IP address for connections to the Exchange Online Protection PowerShell endpoint.
109+
To fix the issue, use an SNAT pool that contains a single IP address, or force the use of a specific IP address for connections to the Exchange Online Protection PowerShell endpoint.
106110

107111
## See also
108112

109113
The cmdlets that you use in this topic are Windows PowerShell cmdlets. For more information about these cmdlets, see the following topics.
110-
114+
111115
- [Get-Credential](https://go.microsoft.com/fwlink/p/?LinkId=389618)
112116

113117
- [New-PSSession](https://go.microsoft.com/fwlink/p/?LinkId=389621)

exchange/docs-conceptual/exchange-eop/exchange-online-protection-powershell.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Exchange Online Protection PowerShell"
33
ms.author: chrisda
44
author: chrisda
5-
manager: serdars
5+
manager: dansimp
66
ms.date: 2/20/2018
77
ms.audience: Admin
88
ms.topic: article
@@ -14,16 +14,19 @@ description: "Learn about using PowerShell in Exchange Online Protection"
1414

1515
# Exchange Online Protection PowerShell
1616

17-
Exchange Online Protection PowerShell is the administrative interface that enables you to manage your Exchange Online Protection (EOP) organization from the command line. For example, you can use Exchange Online Protection PowerShell to configure mail flow rules (also known as transport rules) and connectors. The following topics provide information about using Exchange Online Protection PowerShell:
17+
Exchange Online Protection PowerShell is the administrative interface that enables you to manage your Exchange Online Protection (EOP) organization from the command line. For example, you can use Exchange Online Protection PowerShell to configure mail flow rules (also known as transport rules) and connectors.
18+
19+
> [!NOTE]
20+
> 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).
21+
22+
The following topics provide information about using Exchange Online Protection PowerShell:
1823

19-
- To create a remote PowerShell session to your Exchange Online Protection organization, see [Connect to Exchange Online Protection PowerShell](connect-to-exchange-online-protection-powershell.md).
24+
- To create a remote PowerShell session to your standalone Exchange Online Protection organization, see [Connect to Exchange Online Protection PowerShell](connect-to-exchange-online-protection-powershell.md).
2025

2126
- For a sample script that lets admins who manage multiple tenants (companies) apply configuration settings to their tenants, see [Sample script for applying EOP settings to multiple tenants](https://technet.microsoft.com/library/e87e84e1-7be0-44bf-a414-d91d60ed8817.aspx).
2227

2328
- The following introductory video shows you how to connect to and use Exchange Online Protection PowerShell.
2429

25-
**Note:** This video applies to Exchange Online and EOP organizations. When you connect to your organization, be careful to specify the correct URL (_ConnectionUri_ value). The required URL is different for Exchange Online and EOP organizations.
30+
**Note:** This video applies to Exchange Online and standalone EOP organizations. When you connect to your organization, be sure to specify the correct URL (_ConnectionUri_ value). The required URL is different for Exchange Online and standalone EOP organizations.
2631

2732
[Use Remote PowerShell in EOP](https://videoplayercdn.osi.office.net/hub/?csid=ux-cms-en-us-msoffice&uuid=9cb28006-c2cb-45b6-b72e-eeed8767dee7&AutoPlayVideo=false)
28-
29-

exchange/docs-conceptual/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Connect to Exchange Online PowerShell"
33
ms.author: chrisda
44
author: chrisda
5-
manager: serdars
5+
manager: dansimp
66
ms.date: 7/10/2017
77
ms.audience: Admin
88
ms.topic: article
@@ -16,10 +16,11 @@ description: "Learn how to use remote PowerShell to connect to Exchange Online."
1616
---
1717

1818
# Connect to Exchange Online PowerShell
19+
1920
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.
2021

2122
> [!IMPORTANT]
22-
> 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 an Exchange Online Protection (EOP) standalone customer, and you're using the service to protect on-premises mailboxes, use the connection instructions in the topic [Connect to Exchange Online Protection PowerShell](../../exchange-eop/connect-to-exchange-online-protection-powershell.md). If your 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.
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.
2324
2425
## What do you need to know before you begin?
2526

@@ -31,6 +32,8 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
3132

3233
- Windows 8.1
3334

35+
- Windows Server 2019
36+
3437
- Windows Server 2016
3538

3639
- Windows Server 2012 or Windows Server 2012 R2
@@ -47,7 +50,7 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
4750

4851
To require all PowerShell 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**):
4952

50-
```
53+
```PowerShell
5154
Set-ExecutionPolicy RemoteSigned
5255
```
5356

@@ -56,19 +59,19 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
5659
> [!TIP]
5760
> 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).
5861
59-
## Connect to Exchange Online PowerShell
62+
## Connect to Exchange Online
6063

6164
1. On your local computer, open Windows PowerShell and run the following command.
6265

63-
```
66+
```PowerShell
6467
$UserCredential = Get-Credential
6568
```
6669

6770
In the **Windows PowerShell Credential Request** dialog box, type your work or school account and password, and then click **OK**.
6871

69-
2. Run the following command.
72+
2. Run the following command:
7073

71-
```
74+
```PowerShell
7275
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
7376
```
7477

@@ -86,16 +89,16 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
8689

8790
For more information, see [New-PSSessionOption](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/new-pssessionoption).
8891

89-
3. Run the following command.
92+
3. Run the following command:
9093

91-
```
94+
```PowerShell
9295
Import-PSSession $Session -DisableNameChecking
9396
```
9497

9598
> [!NOTE]
96-
> Be sure to disconnect the remote PowerShell session when you're finished. If you close the Windows PowerShell 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 the remote PowerShell session, run the following command.
99+
> Be sure to disconnect the remote PowerShell session when you're finished. If you close the Windows PowerShell 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 the remote PowerShell session, run the following command.
97100
98-
```
101+
```PowerShell
99102
Remove-PSSession $Session
100103
```
101104

@@ -113,6 +116,8 @@ If you receive errors, check the following requirements:
113116

114117
- 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.
115118

119+
- 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.
120+
116121
## See also
117122

118123
The cmdlets that you use in this topic are Windows PowerShell cmdlets. For more information about these cmdlets, see the following topics.

0 commit comments

Comments
 (0)