Solved

Add proxy settings to AD via Powershell

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…

691 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