Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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
?
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

Question has a verified solution.

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

The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

670 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