Skip to content

Commit 6038854

Browse files
authored
Merge pull request MicrosoftDocs#8605 from MicrosoftDocs/chrisda
Update disable-access-to-exchange-online-powershell.md
2 parents c006174 + 654e88d commit 6038854

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ $<VariableName> = <Get-Mailbox | Get-User> -ResultSize unlimited -Filter <Filter
6464
```
6565

6666
```powershell
67-
$<VariableName> | foreach {Set-User -Identity $_ -RemotePowerShellEnabled $false}
67+
$<VariableName> | foreach {Set-User -Identity $_.WindowsEmailAddress -RemotePowerShellEnabled $false}
6868
```
6969

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

7676
```powershell
77-
$DSA | foreach {Set-User -Identity $_ -RemotePowerShellEnabled $false}
77+
$DSA | foreach {Set-User -Identity $_.WindowsEmailAddress -RemotePowerShellEnabled $false}
7878
```
7979

8080
### Use a list of specific users

0 commit comments

Comments
 (0)