Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3387
  • Last Modified:

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

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?
0
TRTurner
Asked:
TRTurner
  • 2
  • 2
1 Solution
 
GiladnCommented:
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!
0
 
Justin YeungCommented:
import-module activedirectory
$users = get-aduser -filter * -properties *
foreach ($user in $users)
{
$user | set-aduser -remove @{msExchHideFromAddressList = $true}
]
0
 
GiladnCommented:
Justin Yeung - nice one, never used it, if it's working it's a better solution then using a 3rd party tool.
0
 
Justin YeungCommented:
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.
0
 
TRTurnerAuthor Commented:
Thanks
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now