can someone provide a powershell script that we can use to bulk hide a set of users from the GAL - Exchange 2010

need a powershell script to bulk hide a set of users on an .CSV file from the GAL in exchange 2010?

thx in advance,

S.
siber1Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
becraigConnect With a Mentor Commented:
import-csv | % {Set-mailcontact $_.identity -HiddenFromAddressListsEnabled $true}

Open in new window


$_.identity assumes the mailbox name is stored in your csv as a column named identity, replace it with the correct value from your csv
0
 
Will SzymkowskiConnect With a Mentor Senior Solution ArchitectCommented:
Use the following powershell script below...
$Users = import-csv "c:\yourcsvhere.csv"
foreach ($user in $Users) {
$user.alias
      Get-Mailbox -Identity $user.alias | set-mailbox -HiddenFromAddressListsEnabled $true
}

Open in new window


Your CSV needs to have the column heading ALIAS. Then having all of the alias or samaccountname underneath.

Will.
0
 
siber1Author Commented:
thanks much becraig and Will, both excellent solutions
0
 
becraigCommented:
Happy to help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.