• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 859
  • Last Modified:

Add new proxyaddress attribute scripted

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
alexr54
Asked:
alexr54
  • 4
1 Solution
 
strivoliCommented:
Could you make a "manual" example? Create a test user, add the proxy address and post results (screen shots or whatever). Thank you.
0
 
alexr54Author Commented:
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
 
alexr54Author Commented:
Anyone?
0
 
alexr54Author Commented:
I figured it out by using quest powershell software.
0
 
alexr54Author Commented:
Answered myself.
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now