Skip to content

Commit be6db17

Browse files
authored
Update control-remote-powershell-access-to-exchange-servers.md
1 parent 74d578e commit be6db17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

exchange/docs-conceptual/control-remote-powershell-access-to-exchange-servers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $<VariableName> = <Get-Mailbox | Get-User> -ResultSize Unlimited -Filter <Filter
6565
```
6666

6767
```powershell
68-
$<VariableName> | ForEach-Object {Set-User $_ -RemotePowerShellEnabled $false}
68+
$<VariableName> | foreach {Set-User -Identity $_ -RemotePowerShellEnabled $false}
6969
```
7070

7171
This example removes access to remote PowerShell for all users whose **Title** attribute contains the value "Sales Associate".
@@ -75,7 +75,7 @@ $DSA = Get-User -ResultSize Unlimited -Filter "(RecipientType -eq 'UserMailbox')
7575
```
7676

7777
```powershell
78-
$DSA | ForEach-Object {Set-User $_ -RemotePowerShellEnabled $false}
78+
$DSA | foreach {Set-User -Identity $_ -RemotePowerShellEnabled $false}
7979
```
8080

8181
### Use a list of specific users
@@ -101,7 +101,7 @@ $NPS = Get-Content "C:\My Documents\NoPowerShell.txt"
101101
```
102102

103103
```powershell
104-
$NPS | ForEach-Object {Set-User $_ -RemotePowerShellEnabled $false}
104+
$NPS | foreach {Set-User -Identity $_ -RemotePowerShellEnabled $false}
105105
```
106106

107107
## View the remote PowerShell access for users

0 commit comments

Comments
 (0)