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: README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ A repository to hold the help reference content for Office PowerShell cmdlets. T
5
5

6
6
7
7
# Learn How To Contribute
8
-
Anyone who is interested can contribute to the Microsoft Office PowerShell reference topics.
8
+
Anyone who is interested can contribute to the Microsoft Office PowerShell reference topics.
9
9
When you contribute your work will go directly into the Microsoft Office products and show up in Get-Help for the given Office cmdlet.
10
10
11
11
> Notice that if you are looking into contributing for the **PnP PowerShell cmdlets**, their documentation is automatically generated from the code and you should be submitting your change towards the original code at https://github.com/SharePoint/PnP-powershell. See for example how the attributes are used in the code for the [Get-PnPList](https://github.com/SharePoint/PnP-PowerShell/blob/master/Commands/Lists/GetList.cs) cmdlet.
@@ -73,4 +73,4 @@ Microsoft's general trademark guidelines can be found at http://go.microsoft.com
73
73
Privacy information can be found at https://privacy.microsoft.com/en-us/
74
74
75
75
Microsoft and any contributors reserve all others rights, whether under their respective copyrights, patents,
76
-
or trademarks, whether by implication, estoppel or otherwise.
76
+
or trademarks, whether by implication, estoppel or otherwise.
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/exchange-eop/connect-to-exchange-online-protection-powershell.md
+45-45Lines changed: 45 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -15,66 +15,66 @@ description: "Use remote PowerShell to connect to an Exchange Online Protection
15
15
# Connect to Exchange Online Protection PowerShell
16
16
17
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.
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
23
- You can use the following versions of Windows:
24
-
24
+
25
25
- Windows 10
26
-
26
+
27
27
- Windows 8.1
28
-
28
+
29
29
- Windows Server 2016
30
-
30
+
31
31
- Windows Server 2012 or Windows Server 2012 R2
32
-
33
-
- Windows 7 Service Pack 1 (SP1)\*
34
-
35
-
- Windows Server 2008 R2 SP1\*
36
-
37
-
\* You need to install the Microsoft.NET Framework 4.5 or later and then either the Windows Management Framework 3.0or the Windows Management Framework 4.0. For more information, see [Installing the .NET Framework](https://go.microsoft.com/fwlink/p/?LinkId=257868) and [Windows Management Framework 3.0](https://go.microsoft.com/fwlink/p/?LinkId=272757) or [Windows Management Framework 4.0](https://go.microsoft.com/fwlink/p/?LinkId=391344).
38
-
39
-
- Windows PowerShell needs to be configured to run scripts, and by default, it isn't. You get the following error when you try to connect:
40
-
41
-
`Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.`
42
-
32
+
33
+
- Windows 7 Service Pack 1 (SP1)<sup>*</sup>
34
+
35
+
- Windows Server 2008 R2 SP1<sup>*</sup>
36
+
37
+
<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).
38
+
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:
40
+
41
+
`Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.`
42
+
43
43
To enable Windows PowerShell to run signed scripts, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you open by selecting **Run as administrator**):
44
-
45
-
```
46
-
Set-ExecutionPolicy RemoteSigned
47
-
```
44
+
45
+
```
46
+
Set-ExecutionPolicy RemoteSigned
47
+
```
48
48
49
49
You need to configure this setting only once on your computer, not every time you connect.
50
-
50
+
51
51
> [!TIP]
52
-
> 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).
53
-
52
+
> 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).
53
+
54
54
## Connect to Exchange Online Protection
55
55
56
56
1. On your local computer, open Windows PowerShell and run the following command:
57
-
58
-
```
59
-
$UserCredential = Get-Credential
60
-
```
57
+
58
+
```
59
+
$UserCredential = Get-Credential
60
+
```
61
61
62
62
In the **Windows PowerShell Credential Request** dialog box, type your work or school account and password, and then click **OK**.
- For Office 365 Germany, use the _ConnectionUri_ value: `https://ps.protection.outlook.de/powershell-liveid/`
73
-
74
-
- 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/`
75
-
70
+
**Notes**:
71
+
72
+
- For Office 365 Germany, use the _ConnectionUri_ value: `https://ps.protection.outlook.de/powershell-liveid/`
73
+
74
+
- 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/`
75
+
76
76
3. Run the following command:
77
-
77
+
78
78
```
79
79
Import-PSSession $Session
80
80
```
@@ -93,27 +93,27 @@ After Step 3, the Exchange Online Protection cmdlets are imported into your loca
93
93
If you receive errors, check the following requirements:
94
94
95
95
- 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.
96
-
96
+
97
97
- To help prevent denial-of-service (DoS) attacks, you're limited to three open remote PowerShell connections to your Exchange Online Protection organization.
98
-
98
+
99
99
- 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.
100
100
101
101
- 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:
102
102
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.`
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.`
104
104
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.
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.
106
106
107
107
## See also
108
108
109
109
The cmdlets that you use in this topic are Windows PowerShell cmdlets. For more information about these cmdlets, see the following topics.
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell.md
+49-50Lines changed: 49 additions & 50 deletions
Original file line number
Diff line number
Diff line change
@@ -16,106 +16,105 @@ description: "Learn how to use remote PowerShell to connect to Exchange Online."
16
16
17
17
# Connect to Exchange Online PowerShell
18
18
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.
19
-
19
+
20
20
> [!IMPORTANT]
21
21
> 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). 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.
22
-
22
+
23
23
## What do you need to know before you begin?
24
24
25
25
- Estimated time to complete: 5 minutes
26
-
26
+
27
27
- You can use the following versions of Windows:
28
-
28
+
29
29
- Windows 10
30
-
30
+
31
31
- Windows 8.1
32
-
32
+
33
33
- Windows Server 2016
34
-
34
+
35
35
- Windows Server 2012 or Windows Server 2012 R2
36
-
37
-
- Windows 7 Service Pack 1 (SP1)\*
38
-
39
-
- Windows Server 2008 R2 SP1\*
40
-
41
-
\* You need to install the Microsoft.NET Framework 4.5 or later and then either the Windows Management Framework 3.0or the Windows Management Framework 4.0. For more information, see [Installing the .NET Framework](https://go.microsoft.com/fwlink/p/?LinkId=257868) and[Windows Management Framework 3.0](https://go.microsoft.com/fwlink/p/?LinkId=272757) or[Windows Management Framework 4.0](https://go.microsoft.com/fwlink/p/?LinkId=391344).
42
-
43
-
- Windows PowerShell needs to be configured to run scripts, and by default, it isn't. You get the following error when you try to connect:
44
-
45
-
`Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.`
46
-
47
-
To enable Windows PowerShell to run signed scripts, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you open by selecting **Run as administrator**):
48
-
36
+
37
+
- Windows 7 Service Pack 1 (SP1)<sup>*</sup>
38
+
39
+
- Windows Server 2008 R2 SP1<sup>*</sup>
40
+
41
+
<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).
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:
44
+
45
+
`Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.`
46
+
47
+
To enable Windows PowerShell to run signed scripts, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you open by selecting **Run as administrator**):
48
+
49
49
```
50
50
Set-ExecutionPolicy RemoteSigned
51
51
```
52
52
53
-
You need to configure this setting only once on your computer, not every time you connect.
54
-
55
-
53
+
You need to configure this setting only once on your computer, not every time you connect.
54
+
56
55
> [!TIP]
57
56
> 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).
58
-
57
+
59
58
## Connect to Exchange Online PowerShell
60
59
61
60
1. On your local computer, open Windows PowerShell and run the following command.
62
-
61
+
63
62
```
64
63
$UserCredential = Get-Credential
65
64
```
66
65
In the **Windows PowerShell Credential Request** dialog box, type your work or school account and password, and then click **OK**.
- For Office 365 operated by 21Vianet, use the _ConnectionUri_ value: `https://partner.outlook.cn/PowerShell`
77
-
78
-
- For Office 365 Germany, use the _ConnectionUri_ value: `https://outlook.office.de/powershell-liveid/`
79
-
74
+
75
+
- For Office 365 operated by 21Vianet, use the _ConnectionUri_ value: `https://partner.outlook.cn/PowerShell`
76
+
77
+
- For Office 365 Germany, use the _ConnectionUri_ value: `https://outlook.office.de/powershell-liveid/`
78
+
80
79
3. Run the following command.
81
-
80
+
82
81
```
83
82
Import-PSSession $Session
84
83
```
85
84
86
85
> [!NOTE]
87
86
> 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
-
```
90
-
Remove-PSSession $Session
91
-
```
87
+
88
+
```
89
+
Remove-PSSession $Session
90
+
```
92
91
93
92
## How do you know this worked?
94
93
95
94
After Step 3, the Exchange Online 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 cmdlet, for example, **Get-Mailbox**, and see the results.
96
-
95
+
97
96
If you receive errors, check the following requirements:
98
-
97
+
99
98
- 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.
100
-
99
+
101
100
- To help prevent denial-of-service (DoS) attacks, you're limited to three open remote PowerShell connections to your Exchange Online organization.
102
-
101
+
103
102
- 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).
104
-
103
+
105
104
- 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.
106
-
105
+
107
106
## See also
108
107
109
108
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