Skip to content

Commit 6ed45f7

Browse files
committed
Minor formatting fixes to Exchange PowerShell conceptual topics
1 parent 78c3468 commit 6ed45f7

18 files changed

+474
-490
lines changed

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

Lines changed: 13 additions & 10 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

@@ -60,15 +63,15 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
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

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
title: "Connect to Exchange Online PowerShell using multi-factor authentication"
33
ms.author: chrisda
44
author: chrisda
5-
ms.date: 10/24/2017
5+
manager: dansimp
6+
ms.date:
67
ms.audience: Admin
78
ms.topic: article
89
ms.service: exchange-online
@@ -13,10 +14,11 @@ description: "Learn how to connect to Exchange Online PowerShell by using multi-
1314
---
1415

1516
# Connect to Exchange Online PowerShell using multi-factor authentication
17+
1618
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.
1719

1820
> [!NOTE]
19-
> • 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.
21+
> • 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/><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.
2022
2123
## What do you need to know before you begin?
2224

@@ -28,6 +30,8 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
2830

2931
- Windows 8.1
3032

33+
- Windows Server 2019
34+
3135
- Windows Server 2016
3236

3337
- Windows Server 2012 or Windows Server 2012 R2
@@ -54,13 +58,13 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
5458

5559
- 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:
5660

57-
```
61+
```PowerShell
5862
winrm get winrm/config/client/auth
5963
```
6064

6165
If you don't see the value `Basic = true`, you need to run this command to enable basic authentication for WinRM:
6266

63-
```
67+
```PowerShell
6468
winrm set winrm/config/client/auth @{Basic="true"}
6569
```
6670

@@ -79,7 +83,7 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
7983

8084
2. The command that you need to run uses the following syntax:
8185

82-
```
86+
```PowerShell
8387
Connect-EXOPSSession -UserPrincipalName <UPN> [-ConnectionUri <ConnectionUri> -AzureADAuthorizationEndPointUri <AzureADUri>]
8488
```
8589

@@ -96,13 +100,13 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
96100

97101
This example connects to Exchange Online in Office 365 using the account [email protected].
98102

99-
```
103+
```PowerShell
100104
Connect-EXOPSSession -UserPrincipalName [email protected]
101105
```
102106
103107
This example connects to Exchange Online in Office 365 Germany using the account [email protected].
104108
105-
```
109+
```PowerShell
106110
Connect-EXOPSSession -UserPrincipalName [email protected] -ConnectionUri https://outlook.office.de/PowerShell-LiveID -AzureADAuthorizationEndPointUri https://login.microsoftonline.de/common
107111
```
108112
@@ -119,7 +123,7 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
119123
> [!NOTE]
120124
> 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:
121125
122-
```
126+
```PowerShell
123127
Get-PSSession | Remove-PSSession
124128
```
125129

exchange/docs-conceptual/exchange-online/disable-access-to-exchange-online-powershell.md

Lines changed: 39 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Enable or disable access to Exchange Online PowerShell"
33
ms.author: chrisda
44
author: chrisda
5-
manager: serdars
5+
manager: dansimp
66
ms.date:
77
ms.audience: Admin
88
ms.topic: article
@@ -14,122 +14,118 @@ description: "Admins can learn how to enable or disable access to Exchange Onlin
1414
---
1515

1616
# Enable or disable access to Exchange Online PowerShell
17+
1718
Exchange Online PowerShell enables you to manage your Exchange Online organization from the command line. By default, all accounts you create in Office 365 are allowed to use Exchange Online PowerShell. Administrators can use Exchange Online PowerShell to enable or disable a user's ability to connect to Exchange Online PowerShell. Note that access to Exchange Online PowerShell doesn't give users extra administrative powers in your organization. A user's capabilities in Exchange Online PowerShell are still defined by role based access control (RBAC) and the roles that are assigned to them.
18-
19+
1920
## What do you need to know before you begin?
2021

2122
- Estimated time to complete each procedure: less than 5 minutes
22-
23+
2324
- Office 365 global admins have access to Exchange Online PowerShell, and can use the procedures in this topic to configure Exchange Online PowerShell access for other users. For more information about permissions in Exchange Online, see [Feature Permissions in Exchange Online](https://technet.microsoft.com/library/15073ce1-0917-403b-8839-02a2ebc96e16.aspx).
24-
25+
2526
- You can only use Exchange Online PowerShell to perform this procedure. To learn how to use Windows PowerShell to connect to Exchange Online, see [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell/connect-to-exchange-online-powershell.md).
26-
27-
27+
2828
> [!TIP]
29-
> 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).
30-
29+
> 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).
30+
3131
## Enable or disable access to Exchange Online PowerShell for a user
3232

3333
This example disables access to Exchange Online PowerShell for the user [email protected].
34-
35-
```
34+
35+
```PowerShell
3636
Set-User -Identity [email protected] -RemotePowerShellEnabled $false
3737
```
3838

3939
This example enables access to Exchange Online PowerShell for the user [email protected].
40-
41-
```
40+
41+
```PowerShell
4242
Set-User -Identity [email protected] -RemotePowerShellEnabled $true
4343
```
4444

4545
## Disable access to Exchange Online PowerShell for many users
4646

4747
To prevent access to Exchange Online PowerShell for a specific group of existing users, you have the following options:
48-
48+
4949
- **Filter users based on an existing attribute**: This method assumes that the target user accounts all share a unique filterable attribute. Some attributes, such as Title, Department, address information, and telephone number, are visible only when you use the **Get-User** cmdlet. Other attributes, such as CustomAttribute1-15, are visible only when you use the **Get-Mailbox** cmdlet.
50-
50+
5151
- **Use a list of specific users**: After you generate the list of specific users, you can use that list to disable their access to Exchange Online PowerShell.
52-
52+
5353
### Filter users based on an existing attribute
5454

5555
To disable access to Exchange Online PowerShell for any number of users based on an existing attribute, use the following syntax:
56-
57-
```
56+
57+
```PowerShell
5858
$<VariableName> = <Get-Mailbox | Get-User> -ResultSize unlimited -Filter <Filter>
5959
```
6060

61-
```
61+
```PowerShell
6262
$<VariableName> | foreach {Set-User -Identity $_ -RemotePowerShellEnabled $false}
6363
```
6464

6565
This example removes access to Exchange Online PowerShell for all users whose **Title** attribute contains the value "Sales Associate".
66-
67-
```
66+
67+
```PowerShell
6868
$DSA = Get-User -ResultSize unlimited -Filter {(RecipientType -eq 'UserMailbox') -and (Title -like '*Sales Associate*')}
6969
```
7070

71-
```
71+
```PowerShell
7272
$DSA | foreach {Set-User -Identity $_ -RemotePowerShellEnabled $false}
7373
```
7474

7575
### Use a list of specific users
7676

7777
To disable access to Exchange Online PowerShell for a list of specific users, use the following syntax:
78-
79-
```
78+
79+
```PowerShell
8080
$<VariableName> = Get-Content <text file>
8181
```
8282

83-
```
83+
```PowerShell
8484
$<VariableName> | foreach {Set-User -Identity $_ -RemotePowerShellEnabled $false}
8585
```
8686

8787
This example uses the text file C:\My Documents\NoPowerShell.txt to identify the users by their accounts. The text file must contain one account on each line as follows:
88-
89-
```
90-
91-
92-
93-
```
88+
89+
9490
9591
After you populate the text file with the user accounts you want to update, run the following commands:
96-
97-
```
92+
93+
```PowerShell
9894
$NPS = Get-Content "C:\My Documents\NoPowerShell.txt"
9995
```
10096

101-
```
97+
```PowerShell
10298
$NPS | foreach {Set-User -Identity $_.MicrosoftOnlineServicesID -RemotePowerShellEnabled $false}
10399
```
104100

105101
## View the Exchange Online PowerShell access for users
106102

107103
To view the Exchange Online PowerShell access status for a specific user, use the following syntax:
108-
109-
```
104+
105+
```PowerShell
110106
Get-User -Identity <UserIdentity> | Format-List RemotePowerShellEnabled
111107
```
112108

113109
This example displays the Exchange Online PowerShell access status of the user named Sarah Jones.
114-
115-
```
110+
111+
```PowerShell
116112
Get-User -Identity "Sarah Jones" | Format-List RemotePowerShellEnabled
117113
```
118114

119115
To display the Exchange Online PowerShell access status for all users, run the following command:
120-
121-
```
116+
117+
```PowerShell
122118
Get-User -ResultSize unlimited | Format-Table -Auto Name,DisplayName,RemotePowerShellEnabled
123119
```
124120

125121
To display only those users who don't have access to Exchange Online PowerShell, run the following command:
126-
127-
```
122+
123+
```PowerShell
128124
Get-User -ResultSize unlimited -Filter {RemotePowerShellEnabled -eq $false}
129125
```
130126

131127
To display only those users who have access to Exchange Online PowerShell, run the following command:
132-
133-
```
128+
129+
```PowerShell
134130
Get-User -ResultSize unlimited -Filter {RemotePowerShellEnabled -eq $true}
135131
```

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Exchange Online 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
@@ -16,17 +16,17 @@ description: "Learn about using PowerShell in Exchange Online"
1616
# Exchange Online PowerShell
1717

1818
Exchange Online PowerShell is the administrative interface that enables you to manage your Microsoft Exchange Online organization from the command line. For example, you can use Exchange Online PowerShell to configure mail flow rules (also known as transport rules) and connectors. The following topics provide information about using Exchange Online PowerShell:
19-
19+
2020
- To create a remote PowerShell session to your Exchange Online organization, see [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell/connect-to-exchange-online-powershell.md).
2121

2222
- To prevent or allow connections to connect to your Exchange Online organization using remote PowerShell, see [Enable or disable access to Exchange Online PowerShell](disable-access-to-exchange-online-powershell.md).
2323

2424
- The following introductory video shows you how to connect to and use Exchange Online PowerShell.
25-
26-
**Note:** This video applies to Exchange Online and Exchange Online Protection (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.
27-
25+
26+
**Note:** This video applies to Exchange Online and standalone Exchange Online Protection (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 EOP organizations.
27+
2828
[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)
29-
29+
3030
- To find the permissions you need to run a specific cmdlet, or one or more parameters on the cmdlet, see [Find the permissions required to run any Exchange cmdlet](../exchange-server/find-exchange-cmdlet-permissions.md).
3131

3232
- To learn about recipient filters in Exchange Online PowerShell, see [Recipient filters in Exchange Management Shell and Exchange Online PowerShell commands](../exchange-server/recipient-filters/recipient-filters.md).

0 commit comments

Comments
 (0)