skip mailboxes in specific organizational unit

Hello,

I have users with wrong windowsemailaddress attribute, these users located in a specific OU in my AD.

I want to run get-mailbox cmdlet that will skip this mailboxes.

the issue is when I'm running the following command:

Get-Mailbox -ResultSize Unlimited | ? {$_.OrganizationalUnit -ne "mydomain/myou etc..."}

I still have warning output that says:

WARNING: Could not convert property WindowsEmailAddress to type SmtpAddress

How do I skip this mailboxes to not be checked in my get-mailbox?

Thanks ahead



July 28th, 2013 9:36am

What is the status if you try to run like this

Get-Mailbox -ResultSize Unlimited | ? {$_.OrganizationalUnit -ne "*myouetc*"}

Free Windows Admin Tool Kit Click here and download it now
July 28th, 2013 10:11am

unfortunately same warnings...
July 28th, 2013 10:15am

If your are aware of the issues and if you want to ignore those warnings, then use this command first and run your queries

$WarningPreference = "SilentlyContinue"

Free Windows Admin Tool Kit Click here and download it now
July 28th, 2013 10:27am

yes, I thought about this solution, but then I thought about an option that if I will have an important warnings... so I shouldn't ignore warnings
July 28th, 2013 10:29am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics