EMS Script - Newb Question
Hello, I'm trying to figure out how to search all our 2007 mailbox servers for any users that don't have a "User Mailbox" Recipient Type mailbox if that makes sense. I've tried several commands with limited success like: Code Snippet Get-ExchangeServer | Where { $_.IsMailboxServer -Eq '$True' } | ForEach { Get-Recipient | Where { $_.msExchRecipientDisplayType -NotLike " UserMailbox"} } or Code Snippet Get-ExchangeServer | Where { $_.IsMailboxServer -Eq '$True' } | ForEach { Get-Recipient | Where { $_.RecipientTypeDetails -Ne " UserMailbox"} } I've tried other varients of this code, but I either get all mailboxes including UserMailbox type or nothing at all. And yes, I do have mailboxes of type LinkedMailbox or SharedMailbox. If I search each mailbox server seperately, I can get the data I need, but when I try to poll all servers at once something isn't working. I'm just learningn ESM/PS, what am I doing wrong? Thanks... -Nick
May 7th, 2008 1:12am

Nevermind, I figured it out. There may be a more elegant way to do this, butthe following codeworks. Now to fine tune it... Code Snippet Get-ExchangeServer | Where { $_.IsMailboxServer -Eq '$True' } | ForEach { Get-Mailbox -Server $_.Name | Where { $_.RecipientTypeDetails -Ne 'UserMailbox' } }
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2008 2:14am

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

Other recent topics Other recent topics