Solved

Add new proxyaddress attribute scripted

Posted on 2013-06-21
5
844 Views
Last Modified: 2013-06-29
I need to add a proxy address (Email alias) to ALOT of AD accounts. I have a CSV which has the users Display Name, UPN, and new Proxy address to add.

I don't have a 2008 R2 DC so I cant use PS 2.0 which makes this complicated for me. If I could use the AD PS Module I can do a simple script in PS to add to the corresponding accounts.

Now I am not sure how I can get this done without PS, using the CSV as reference. ADModify does not do what I need using the CSV.

There is no base format of what the new proxy address needs to be, its random for all the users. Only the CSV has the correct data.

Any ideas?
0
Comment
Question by:alexr54
[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
  • 4
5 Comments
 
LVL 19

Expert Comment

by:strivoli
ID: 39268097
Could you make a "manual" example? Create a test user, add the proxy address and post results (screen shots or whatever). Thank you.
0
 
LVL 2

Author Comment

by:alexr54
ID: 39268685
I am not sure what you mean... But I will try to answer.

The CSV contains 2 columns.
Column A, Column B.
Column A has the user Display Name, Column B has the new proxy address to add to the user in column A.

So for Example:
UserID,NewProxy
John Doe,newproxy1@email.com
Joe Dane,Newproxy2@email.com
John Goodman,Bo1f8@email.com
and on and on...

Using powershell I can easily grab the Display Name in column A, and use Column B to write the data as a proxy address attribute in AD.

Basically I am adding an Email alias to every account, in no particular format that makes any sense. (not up to me) So I would need to use the data in the CSV and can not use any logic to make the attribute.

For example in PS I would do something like:
Import CSV
then
Set-ADUser "$UserID" -Add @{proxyAddresses = ($_.NewProxy";")}

But I don't have the ability to run PS 2.0 in this AD infrastructure, so I need another method.

This sniplet below shows a single entry done in PS of what I need. BUT I cant use PS :(

PS > (Get-ADUser Kazun -Properties proxyaddresses).proxyaddresses
d2@contoso.com
d1@contoso.com
PS > Get-ADUser Kazun | Set-ADUser -Add @{proxyAddresses = "d3@contoso.com"}
PS > (Get-ADUser Kazun -Properties proxyaddresses).proxyaddresses
d3@contoso.com
d2@contoso.com
d1@contoso.com

Open in new window

0
 
LVL 2

Author Comment

by:alexr54
ID: 39272452
Anyone?
0
 
LVL 2

Accepted Solution

by:
alexr54 earned 0 total points
ID: 39272747
I figured it out by using quest powershell software.
0
 
LVL 2

Author Closing Comment

by:alexr54
ID: 39286407
Answered myself.
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

717 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