Skip to content

Commit e84e2c2

Browse files
authored
Update disable-access-to-exchange-online-powershell.md
Added missing -Identity in Set-User bulk commands per Issue #2106
1 parent d5ac64b commit e84e2c2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 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: serdars
6-
ms.date: 2/20/2018
6+
ms.date:
77
ms.audience: Admin
88
ms.topic: article
99
ms.service: exchange-online
@@ -59,7 +59,7 @@ $<VariableName> = <Get-Mailbox | Get-User> -ResultSize unlimited -Filter <Filter
5959
```
6060

6161
```
62-
$<VariableName> | foreach {Set-User -RemotePowerShellEnabled $false}
62+
$<VariableName> | foreach {Set-User -Identity $_.MicrosoftOnlineServicesID -RemotePowerShellEnabled $false}
6363
```
6464

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

7171
```
72-
$DSA | foreach {Set-User -RemotePowerShellEnabled $false}
72+
$DSA | foreach {Set-User -Identity $_.MicrosoftOnlineServicesID -RemotePowerShellEnabled $false}
7373
```
7474

7575
### Use a list of specific users
@@ -81,10 +81,10 @@ $<VariableName> = Get-Content <text file>
8181
```
8282

8383
```
84-
$<VariableName> | foreach {Set-User -RemotePowerShellEnabled $false}
84+
$<VariableName> | foreach {Set-User -Identity $_.MicrosoftOnlineServicesID -RemotePowerShellEnabled $false}
8585
```
8686

87-
This example uses the text file C:\My Documents\NoPowerShell.txt to identify the users by their email addresses. The text file must contain one email address on each line as follows:
87+
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:
8888

8989
```
9090
@@ -99,7 +99,7 @@ $NPS = Get-Content "C:\My Documents\NoPowerShell.txt"
9999
```
100100

101101
```
102-
$NPS | foreach {Set-User -RemotePowerShellEnabled $false}
102+
$NPS | foreach {Set-User -Identity $_.MicrosoftOnlineServicesID -RemotePowerShellEnabled $false}
103103
```
104104

105105
## View the Exchange Online PowerShell access for users

0 commit comments

Comments
 (0)