Skip to content

Commit a3c7954

Browse files
authored
Update Get-MailboxJunkEmailConfiguration.md
Corrected Example 2 per Issue #1460
1 parent 59730a7 commit a3c7954

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

exchange/exchange-ps/exchange/antispam-antimalware/Get-MailboxJunkEmailConfiguration.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
3737

3838
### -------------------------- Example 1 --------------------------
3939
```
40-
Get-MailboxJunkEmailConfiguration "David Pelton"
40+
Get-MailboxJunkEmailConfiguration -Identity "David Pelton"
4141
```
4242

43-
This example displays the junk email rule configuration for the user named David Pelton.
43+
This example returns the junk email configuration for the user named David Pelton.
4444

4545
### -------------------------- Example 2 --------------------------
4646
```
47-
Get-MailboxJunkEmailConfiguration -Identity * | Where {$_.Enabled -eq $false}
47+
$AllUsers = Get-Mailbox -ResultSize unlimited RecipientTypeDetails UserMailbox; $AllUsers | foreach {Get-MailboxJunkEmailConfiguration -Identity $_.Identity} | Where {$_.Enabled -eq $false} | Format-Table -Auto Identity,Enabled
4848
```
4949

50-
This example displays the junk email rule configuration for all mailboxes in your organization where the junk email rule disabled.
50+
This example returns a summary list of all mailboxes in your organization where the junk email rule is disabled. The first command stores all user mailboxes in a variable. The second command parses through the mailboxes and returns the FQDN of the mailboxes where the junk email rule is disabled.
51+
52+
To return all mailboxes where the junk email rule is enabled, change the value $false to $true. To return a mixed list of mailboxes where the junk email rule is enabled and disabled, remove the "| Where {$\_.Enabled -eq $false " part of the second command.
5153

5254
## PARAMETERS
5355

0 commit comments

Comments
 (0)