Change the the AD attribute value of msExchHideFromAddressList to <not set> for everyone in my AD.

Thomas Turner
Thomas Turner used Ask the Experts™
on
Change the the AD attribute value of msExchHideFromAddressList to <not set> for everyone in my AD.

I have some users that are set to TRUE but most are set to <not set>

Anyone know a good PowerShell script that will change everyone in the AD at once?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
http://admodify.codeplex.com/
an amazing tool. I believe it is working with 2008 too, very easy to use - you have all attributes there, use with caution!
Justin YeungSenior Systems Engineer

Commented:
import-module activedirectory
$users = get-aduser -filter * -properties *
foreach ($user in $users)
{
$user | set-aduser -remove @{msExchHideFromAddressList = $true}
]
Justin Yeung - nice one, never used it, if it's working it's a better solution then using a 3rd party tool.
Senior Systems Engineer
Commented:
import-module activedirectory
$users = get-aduser -filter * -properties *
foreach ($user in $users)
{
if ($user.msExchHideFromAddressList -eq $true)
{
set-aduser $user -clear msExchHideFromAddressList
}
}

some typo on it............ yea you don't need any other 3rd party tools in AD at all.

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial