Solved

Add proxy settings to AD via Powershell

Posted on 2014-12-09
4
168 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
  • 2
4 Comments
 
LVL 35

Accepted Solution

by:
Mahesh earned 500 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 24

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 24

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

Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

Question has a verified solution.

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

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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…

932 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

12 Experts available now in Live!

Get 1:1 Help Now