Hide From Exchange Address Lists

  • Follow


I'm trying to get the check box that says "Hide From Exchange Address
Lists" checked for about 900 mail contacts in our exchange 2007
system.  To select the users, I enter this into powershell:

get-user -filter {WindowsEmailAddress -eq '*@MyCompany.com'}

When I do that, it pulls every user that I am interested in.  However,
when I try to pipe that into get-mailcontact, I get an error that says
the user that was piped in can't be found on the domain controller.
I've tried forcing it to different domain controllers and always get
the same result.

Any suggestions for getting around this?

Thanks.
0
Reply Jeff 4/1/2010 3:42:12 PM

Hello Jeff,

> I'm trying to get the check box that says "Hide From Exchange Address
> Lists" checked for about 900 mail contacts in our exchange 2007
> system.  To select the users, I enter this into powershell:
> 
> get-user -filter {WindowsEmailAddress -eq '*@MyCompany.com'}
> 
> When I do that, it pulls every user that I am interested in.  However,
> when I try to pipe that into get-mailcontact, I get an error that says
> the user that was piped in can't be found on the domain controller.
> I've tried forcing it to different domain controllers and always get
> the same result.
> 
> Any suggestions for getting around this?
> 
> Thanks.
> 

Why not use Get-MailContact?

Get-MailContact  -filter {WindowsEmailAddress -eq '*@MyCompany.com'} |Set-MailContact 
-HiddenFromAddressListsEnabled: $True -whatif


Karl
http://unlockpowershell.wordpress.com/


0
Reply Karl 4/1/2010 4:51:00 PM


Karl,

Thanks for your reply.  I tried just using get-mailcontact and the
syntax you provide works.  However(and this is what I find puzzling),
when I use get-mailcontact like you suggest, it doesn't error out, but
I also don't get any results back.  However, replacing get-mailcontact
with get-user gives me all of the entries I'm trying to find.

Thanks,
Jeff

On Apr 1, 12:51=A0pm, Karl Mitschke <karlmitsc...@somestate.gov> wrote:
> Hello Jeff,
>
>
>
>
>
> > I'm trying to get the check box that says "Hide From Exchange Address
> > Lists" checked for about 900 mail contacts in our exchange 2007
> > system. =A0To select the users, I enter this into powershell:
>
> > get-user -filter {WindowsEmailAddress -eq '...@MyCompany.com'}
>
> > When I do that, it pulls every user that I am interested in. =A0However=
,
> > when I try to pipe that into get-mailcontact, I get an error that says
> > the user that was piped in can't be found on the domain controller.
> > I've tried forcing it to different domain controllers and always get
> > the same result.
>
> > Any suggestions for getting around this?
>
> > Thanks.
>
> Why not use Get-MailContact?
>
> Get-MailContact =A0-filter {WindowsEmailAddress -eq '...@MyCompany.com'} =
|Set-MailContact
> -HiddenFromAddressListsEnabled: $True -whatif
>
> Karlhttp://unlockpowershell.wordpress.com/

0
Reply Jeff 4/1/2010 5:13:13 PM

On Thu, 1 Apr 2010 10:13:13 -0700 (PDT), Jeff <jbrusoe@gmail.com>
wrote:

>Thanks for your reply.  I tried just using get-mailcontact and the
>syntax you provide works.  However(and this is what I find puzzling),
>when I use get-mailcontact like you suggest, it doesn't error out, but
>I also don't get any results back.  However, replacing get-mailcontact
>with get-user gives me all of the entries I'm trying to find.

It's unlikely that mail-enabled Contacts will have a primary SMTP
proxy address in one of your domains. They'd have e-mail addresses in
other domains.

FYI, using the WindowsEmailAddress property can be misleading. The
property is named appropriately -- it isn't used by Exchange. You'd do
much better using the PrimarySmtpAddress property.
---
Rich Matheisen
MCSE+I, Exchange MVP
0
Reply Rich 4/2/2010 1:55:29 AM

3 Replies
635 Views

(page loaded in 0.051 seconds)

Similiar Articles:
















7/26/2012 3:54:25 AM


Reply: