[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1077
  • Last Modified:

EMS Command to find all Exchange mailboxes EMail address policy and remove hidden from the GAL

Hi,  we are making a change to our default email Policy .
I have the EMS command that list the users who don't have this option checked. this works great!
Get-Mailbox -ResultSize Unlimited | Where {$_.EmailAddressPolicyEnabled -eq $False}

My problem is it also showing me all Hidden email accounts.
What command can I add to not show me User accounts hidden accounts
would it be this command somewhere in the line command above?  ({$_.HiddenFromAddressListsEnabled -
 eq $true}
0
len_430
Asked:
len_430
  • 3
  • 3
1 Solution
 
gheistCommented:
What is EMS? A postal company?
0
 
len_430Author Commented:
Exchange management shell.  I am looking for a powershell command

Hi,  we are making a change to our default email Policy .
 I have the Powershell command that list the users who don't have this option checked. this works great!
 Get-Mailbox -ResultSize Unlimited | Where {$_.EmailAddressPolicyEnabled -eq $False}

 My problem is it also showing me all Hidden email accounts.
 What command can I add to not show me User accounts hidden accounts
 would it be this command somewhere in the line command above?  ({$_.HiddenFromAddressListsEnabled -
  eq $true}
0
 
SubsunCommented:
This command will do it..
Get-Mailbox -ResultSize Unlimited | Where {$_.EmailAddressPolicyEnabled -eq $False -and $_.HiddenFromAddressListsEnabled -eq $False}

Open in new window

0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
len_430Author Commented:
Thank you so much!  This is exactly what I needed. Worked like a charm
0
 
len_430Author Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for len_430's comment #a40294100

for the following reason:

Perfect Solution that I needed. Quick response
0
 
SubsunCommented:
0
 
SubsunCommented:
Thanks eenookami!!
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now