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/connect-to-exchange-online-powershell.md
+20-18Lines changed: 20 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -47,9 +47,9 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
47
47
48
48
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**):
49
49
50
-
```
51
-
Set-ExecutionPolicy RemoteSigned
52
-
```
50
+
```
51
+
Set-ExecutionPolicy RemoteSigned
52
+
```
53
53
54
54
You need to configure this setting only once on your computer, not every time you connect.
55
55
@@ -60,9 +60,10 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
60
60
61
61
1. On your local computer, open Windows PowerShell and run the following command.
62
62
63
-
```
64
-
$UserCredential = Get-Credential
65
-
```
63
+
```
64
+
$UserCredential = Get-Credential
65
+
```
66
+
66
67
In the **Windows PowerShell Credential Request** dialog box, type your work or school account and password, and then click **OK**.
67
68
68
69
2. Run the following command.
@@ -71,23 +72,25 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
- For Office 365 operated by 21Vianet, use the _ConnectionUri_ value: `https://partner.outlook.cn/PowerShell`
77
+
- For Office 365 operated by 21Vianet, use the _ConnectionUri_ value: `https://partner.outlook.cn/PowerShell`
77
78
78
-
- For Office 365 Germany, use the _ConnectionUri_ value: `https://outlook.office.de/powershell-liveid/`
79
+
- For Office 365 Germany, use the _ConnectionUri_ value: `https://outlook.office.de/powershell-liveid/`
79
80
80
-
- 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`.
81
+
- For Office 365 Government Community Cloud High (GCC High), use the _ConnectionUri_ value: `https://ps.compliance.protection.office365.us/powershell-liveid/`
82
+
83
+
- 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`.
81
84
82
-
Then, add the following parameter and value to the end of the $Session = ... command: `-SessionOption $ProxyOptions`.
85
+
Then, add the following parameter and value to the end of the $Session = ... command: `-SessionOption $ProxyOptions`.
83
86
84
-
For more information, see [New-PSSessionOption](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/new-pssessionoption).
87
+
For more information, see [New-PSSessionOption](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/new-pssessionoption).
85
88
86
89
3. Run the following command.
87
90
88
-
```
89
-
Import-PSSession $Session -DisableNameChecking
90
-
```
91
+
```
92
+
Import-PSSession $Session -DisableNameChecking
93
+
```
91
94
92
95
> [!NOTE]
93
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.
@@ -108,7 +111,7 @@ If you receive errors, check the following requirements:
108
111
109
112
- 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).
110
113
111
-
- 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.
114
+
- 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.
112
115
113
116
## See also
114
117
@@ -124,5 +127,4 @@ The cmdlets that you use in this topic are Windows PowerShell cmdlets. For more
0 commit comments