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

x
?
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
Medium Priority
?
220 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 29

Accepted Solution

by:
becraig earned 1000 total points
ID: 40565453
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 1000 total points
ID: 40565459
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
ID: 40565551
thanks much becraig and Will, both excellent solutions
0
 
LVL 29

Expert Comment

by:becraig
ID: 40565552
Happy to help.
0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

877 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