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}
len_430Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
What were the top attacks of Q1 2018?

The Threat Lab team analyzes data from WatchGuard’s Firebox Feed, internal and partner threat intelligence, and a research honeynet, to provide insightful analysis about the top threats on the Internet. Check out our Q1 2018 report for smart, practical security advice today!

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.