Skip to content

Commit a80a3c2

Browse files
authored
Merge pull request MicrosoftDocs#2197 from MicrosoftDocs/chrisda-patch-1
Update disable-access-to-exchange-online-powershell.md
2 parents 1f47beb + 78dbbae commit a80a3c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $<VariableName> = <Get-Mailbox | Get-User> -ResultSize unlimited -Filter <Filter
5959
```
6060

6161
```
62-
$<VariableName> | foreach {Set-User -Identity $_.MicrosoftOnlineServicesID -RemotePowerShellEnabled $false}
62+
$<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".
@@ -69,7 +69,7 @@ $DSA = Get-User -ResultSize unlimited -Filter {(RecipientType -eq 'UserMailbox')
6969
```
7070

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

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

8383
```
84-
$<VariableName> | foreach {Set-User -Identity $_.MicrosoftOnlineServicesID -RemotePowerShellEnabled $false}
84+
$<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:

0 commit comments

Comments
 (0)