Solved

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

Posted on 2015-01-22
4
179 Views
Last Modified: 2015-01-22
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.
0
Comment
Question by:siber1
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
becraig earned 250 total points
Comment Utility
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
 
LVL 53

Assisted Solution

by:Will Szymkowski
Will Szymkowski earned 250 total points
Comment Utility
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
 

Author Closing Comment

by:siber1
Comment Utility
thanks much becraig and Will, both excellent solutions
0
 
LVL 28

Expert Comment

by:becraig
Comment Utility
Happy to help.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
This video discusses moving either the default database or any database to a new volume.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now