?
Solved

Add proxy settings to AD via Powershell

Posted on 2014-12-09
4
Medium Priority
?
189 Views
Last Modified: 2014-12-29
I need to add a second smtp address to the proxy addresses in the attribute editor for 1100 users in AD. I wish to do this by selecting a .csv file via powershell. The problem is I'm not sure of the command and I'm also not sure what data in required in the.csv for this to work.
0
Comment
Question by:James Danahay
[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 37

Accepted Solution

by:
Mahesh earned 2000 total points
ID: 40492003
I am not aware with PowerShell

However I know the tool "Bulk AD Users" from WiseSoft

Within tool you can do csv update

The tool allows you to update specific attributes on the basis of csv

You can check Tool and its functionality on below site, Tool is freeware
http://www.wisesoft.co.uk/software/bulkadusers/csv_update.aspx

U can test it 1st if its able to append proxyaddress for few accounts
Hopefully it should resolve your purpose
The tool does not require PowerShell, it can be run from 2003 to 2012 R2, any server
0
 
LVL 25

Expert Comment

by:Coralon
ID: 40495250
Can very easily be done with powershell.  

This can be done without extra tools, but it's much harder..
I'd start with the Quest (now part of Dell) ActiveRoles Management Shell for Active Directory 1.7 https://support.software.dell.com/download-install-detail/5024645

So.. assuming you have that, and assume your CSV file is set up like this:
AccountName,NewMailAddress

Be sure you include the header row.
import-module -name quest*

$csv = import-module -path c:\temp\users.csv

$csv | foreach-object {

$user = get-qaduser -identity $_.AccountName -includedProperties proxyAddresses
set-qaduser -objectAttributes { proxyAddresses=@{Append=@("smtp:$user.NewMailAddress")}}

$user = $null
$mail = $null
}

Open in new window


That should pretty much do it. For reference, look at Shay Levy's article - http://blogs.microsoft.co.il/scriptfanatic/2010/02/04/modifying-multivalued-active-directory-attributes/

Worst case, you might have to tweak it a bit.  but the basics should be good :-)

Coralon
0
 

Author Comment

by:James Danahay
ID: 40505976
Hi - If I type just Import-module it asks for a name0 ,1, 2 etc  - what does the name represent? What should the module name be?
0
 
LVL 25

Expert Comment

by:Coralon
ID: 40506143
You just literally type it in as is.. but don't forget the asterisk.

import-module -name quest*

That will import all modules that start with quest.

Coralon
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

801 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