Skip to content

Commit 0e8e412

Browse files
authored
Merge branch 'main' into samramon-legacy-exchange-parameters
2 parents acfc6d5 + e64947d commit 0e8e412

File tree

5 files changed

+33
-18
lines changed

5 files changed

+33
-18
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Enable or disable access to Exchange Online PowerShell"
33
ms.author: chrisda
44
author: chrisda
55
manager: deniseb
6-
ms.date: 5/16/2024
6+
ms.date: 12/11/2024
77
ms.audience: Admin
88
audience: Admin
99
ms.topic: article
@@ -18,7 +18,7 @@ description: "Admins can learn how to disable or enable access to Exchange Onlin
1818

1919
Exchange Online PowerShell is the administrative interface that enables admins to manage the Exchange Online part of a Microsoft 365 organization from the command line (including many security features in Exchange Online Protection and Microsoft Defender for Office 365).
2020

21-
By default, all accounts in Microsoft 365 are allowed to use Exchange Online PowerShell. This access doesn't give users administrative capabilities in an organization. They're still limited by [role based access control (RBAC)](/exchange/permissions-exo/permissions-exo) (for example, they can configure settings on their own mailbox or manage distribution groups that they own, but not much else).
21+
By default, all accounts in Microsoft 365 are allowed to use Exchange Online PowerShell. This access doesn't give users administrative capabilities. They're still limited by [role based access control (RBAC)](/exchange/permissions-exo/permissions-exo). For example, they can configure some settings on their own mailbox and manage distribution groups that they own, but not much else.
2222

2323
Admins can use the procedures in this article to disable or enable a user's ability to connect to Exchange Online PowerShell.
2424

@@ -33,7 +33,7 @@ Admins can use the procedures in this article to disable or enable a user's abil
3333
- [Microsoft Entra RBAC](/microsoft-365/admin/add-users/about-admin-roles): Membership in the **Exchange Administrator** or **Global Administrator**<sup>\*</sup> roles gives users the required permissions *and* permissions for other features in Microsoft 365.
3434

3535
> [!IMPORTANT]
36-
> In your haste to quickly and globally disable PowerShell access in your cloud-based organization, beware of commands like `Get-User | Set-User -EXOModuleEnabled $false` without considering admin accounts. Use the procedures in this article to selectively remove PowerShell access, or preserve access for those who need it by using the following syntax in your global removal command: `Get-User | Where-Object {$_.UserPrincipalName -ne '[email protected]' -and $_.UserPrincipalName -ne '[email protected]'...} | Set-User -EXOModuleEnabled $false`.
36+
> In your haste to quickly and globally disable PowerShell access in your cloud-based organization, beware of commands like `Get-User | Set-User -EXOModuleEnabled $false` without considering admin accounts. Use the procedures in this article to **selectively** remove PowerShell access, or **preserve access for those who need it** by using the following syntax in your global removal command: `Get-User | Where-Object {$_.UserPrincipalName -ne '[email protected]' -and $_.UserPrincipalName -ne '[email protected]'...} | Set-User -EXOModuleEnabled $false`.
3737
>
3838
> If you accidentally lock yourself out of PowerShell access, create a new admin account in the Microsoft 365 admin center, and then use that account to give yourself PowerShell access using the procedures in this article.
3939
>
@@ -62,7 +62,7 @@ Set-User -Identity [email protected] -EXOModuleEnabled $true
6262

6363
To prevent access to Exchange Online PowerShell for a specific group of existing users, you have the following options:
6464

65-
- **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 available only from the **Get-User** cmdlet. Other attributes, such as CustomAttribute1 to CustomAttribute15, are available only from the **Get-Mailbox** cmdlet.
65+
- **Filter users based on an existing attribute**: This method assumes that the target user accounts all share a unique filterable attribute. Some attributes (for example, Title, Department, address information, and telephone number) are available only from the **Get-User** cmdlet. Other attributes (for example, CustomAttribute1 to CustomAttribute15) are available only from the **Get-Mailbox** cmdlet.
6666
- **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.
6767

6868
### Filter users based on an existing attribute
@@ -107,6 +107,9 @@ $NoPS | foreach {Set-User -Identity $_ -EXOModuleEnabled $false}
107107

108108
## View the Exchange Online PowerShell access status for users
109109

110+
> [!TIP]
111+
> The newer `EXOModuleEnabled` property isn't available to use with the *Filter* parameter on the **Get-User** cmdlet, but the values of the `EXOModuleEnabled` property and the older `RemotePowerShellEnabled` property are always the same, so use the `RemotePowerShellEnabled` property with the *Filter* parameter on the **Get-User** cmdlet.
112+
110113
To view the PowerShell access status for a specific user, replace \<UserIdentity\> with the name or user principal name (UPN) of the user, and run the following command:
111114

112115
```powershell
@@ -122,11 +125,11 @@ Get-User -ResultSize unlimited | Format-Table -Auto DisplayName,EXOModuleEnabled
122125
To display all users who don't have access to Exchange Online PowerShell, run the following command:
123126

124127
```powershell
125-
Get-User -ResultSize unlimited -Filter 'EXOModuleEnabled -eq $false'
128+
Get-User -ResultSize unlimited -Filter 'RemotePowerShellEnabled -eq $false'
126129
```
127130

128131
To display all users who have access to Exchange Online PowerShell, run the following command:
129132

130133
```powershell
131-
Get-User -ResultSize unlimited -Filter 'EXOModuleEnabled -eq $true'
134+
Get-User -ResultSize unlimited -Filter 'RemotePowerShellEnabled -eq $true'
132135
```

exchange/exchange-ps/exchange/New-MailUser.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,14 @@ Accept wildcard characters: False
738738
```
739739

740740
### -RemotePowerShellEnabled
741-
The RemotePowerShellEnabled parameter specifies whether the user can connect to Exchange using remote PowerShell. Remote PowerShell is required to open the Exchange Management Shell on Exchange servers, or to use Windows PowerShell open and import a remote PowerShell session to Exchange. Access to remote PowerShell is required even if you're trying to open the Exchange Management Shell on the local Exchange server. Valid values are:
741+
The RemotePowerShellEnabled parameter specifies whether the user has access to Exchange PowerShell. Valid values are:
742742

743-
- $true: The user can use remote PowerShell. This is the default value.
744-
- $false: The user can't use remote PowerShell.
743+
- $true: The user has access to Exchange Online PowerShell, the Exchange Management Shell, and the Exchange admin center (EAC). This is the default value.
744+
- $false: The user has doesn't have access to Exchange Online PowerShell, the Exchange Management Shell, or the EAC.
745+
746+
Access to Exchange PowerShell is required even if you're trying to open the Exchange Management Shell or the EAC on the local Exchange server.
747+
748+
A user's experience in any of these management interfaces is still controlled by the role-based access control (RBAC) permissions that are assigned to them.
745749

746750
```yaml
747751
Type: Boolean

exchange/exchange-ps/exchange/New-Mailbox.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,12 +1907,12 @@ Accept wildcard characters: False
19071907
```
19081908

19091909
### -RemotePowerShellEnabled
1910-
The RemotePowerShellEnabled parameter specifies whether the user has access to remote PowerShell. Valid values are:
1910+
The RemotePowerShellEnabled parameter specifies whether the user has access to Exchange PowerShell. Valid values are:
19111911

19121912
- $true: The user has access to Exchange Online PowerShell, the Exchange Management Shell, and the Exchange admin center (EAC). This is the default value.
19131913
- $false: The user has doesn't have access to Exchange Online PowerShell, the Exchange Management Shell, or the EAC.
19141914

1915-
Access to remote PowerShell is required even if you're trying to open the Exchange Management Shell or the EAC on the local Exchange server.
1915+
Access to Exchange PowerShell is required even if you're trying to open the Exchange Management Shell or the EAC on the local Exchange server.
19161916

19171917
A user's experience in any of these management interfaces is still controlled by the role-based access control (RBAC) permissions that are assigned to them.
19181918

exchange/exchange-ps/exchange/New-RemoteMailbox.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,10 +622,14 @@ Accept wildcard characters: False
622622
```
623623

624624
### -RemotePowerShellEnabled
625-
The RemotePowerShellEnabled parameter specifies whether the user can connect to Exchange using remote PowerShell. Remote PowerShell is required to open the Exchange Management Shell on Exchange servers, or to use Windows PowerShell open and import a remote PowerShell session to Exchange. Access to remote PowerShell is required even if you're trying to open the Exchange Management Shell on the local Exchange server. Valid values are:
625+
The RemotePowerShellEnabled parameter specifies whether the user has access to Exchange PowerShell. Valid values are:
626626

627-
- $true: The user can use remote PowerShell. This is the default value.
628-
- $false: The user can't use remote PowerShell.
627+
- $true: The user has access to Exchange Online PowerShell, the Exchange Management Shell, and the Exchange admin center (EAC). This is the default value.
628+
- $false: The user has doesn't have access to Exchange Online PowerShell, the Exchange Management Shell, or the EAC.
629+
630+
Access to Exchange PowerShell is required even if you're trying to open the Exchange Management Shell or the EAC on the local Exchange server.
631+
632+
A user's experience in any of these management interfaces is still controlled by the role-based access control (RBAC) permissions that are assigned to them.
629633

630634
```yaml
631635
Type: Boolean

exchange/exchange-ps/exchange/Set-User.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,15 +1017,19 @@ Accept wildcard characters: False
10171017
```
10181018

10191019
### -RemotePowerShellEnabled
1020-
**Note**: This parameter is being deprecated in cloud-based environments. In cloud-based environments, use the EXOModuleEnabled parameter instead.
1020+
**Note**: In cloud-based environments, this parameter is being deprecated, so use the EXOModuleEnabled parameter instead.
10211021

1022-
The RemotePowerShellEnabled parameter specifies whether the user has access to remote PowerShell. Remote PowerShell access is required to open the Exchange Management Shell or the Exchange admin center (EAC), even if you're trying to open the Exchange Management Shell or the EAC on the local Mailbox server. Valid values are:
1022+
The RemotePowerShellEnabled parameter specifies whether the user has access to Exchange PowerShell. Valid values are:
10231023

1024-
- $true: The user has access to remote PowerShell.
1025-
- $false: The user doesn't have access to remote PowerShell.
1024+
- $true: The user has access to Exchange Online PowerShell, the Exchange Management Shell, and the Exchange admin center (EAC).
1025+
- $false: The user has doesn't have access to Exchange Online PowerShell, the Exchange Management Shell, or the EAC.
10261026

10271027
The default value depends on the management roles that are assigned to the user.
10281028

1029+
Access to Exchange PowerShell is required even if you're trying to open the Exchange Management Shell or the EAC on the local Exchange server.
1030+
1031+
A user's experience in any of these management interfaces is still controlled by the role-based access control (RBAC) permissions that are assigned to them.
1032+
10291033
```yaml
10301034
Type: Boolean
10311035
Parameter Sets: (All)

0 commit comments

Comments
 (0)