Solved

Add proxy settings to AD via Powershell

Posted on 2014-12-09
4
165 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 23

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 23

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
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…

705 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

17 Experts available now in Live!

Get 1:1 Help Now