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
194 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 250 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 250 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

749 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