[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

Import ProxyAddresses attribute into ADUsers

Hi there,

does anyone know how to import ProxyAddresses attribute into AD users?

I have found a way to export them. Command bellow will export ProxyAddresses attribute for all users in OU named Migration, into csv file.

 [PS] C:\>Get-ADUser -Filter * -SearchBase 'ou=Migration,dc=test,dc=com' -Properties proxyaddresses | select name, @{L=”ProxyAddresses”;E={$_.ProxyAddresses –join “;”}} | Export-Csv -Path c:\1\proxyaddresses.csv -NoTypeInformation

Now, I have a problem how to import them, in another forest for some users. Since the csv file contains filed  Name, then import should be done in a way to match Name in csv with Name (Display Name) of users in another forest.

Any idea? I have found few articles but no luck so far.

Regards,
0
Ivan
Asked:
Ivan
  • 4
1 Solution
 
David Johnson, CD, MVPOwnerCommented:
why don't you use group policy?
0
 
IvanSystem EngineerAuthor Commented:
Hi,

well..that didn't came to my mind...how would I do that?
0
 
IvanSystem EngineerAuthor Commented:
Maybe there is another way to do this.
Since all users should have ProxyAddresses in format SMTP:first_name.last_name@domain.com maybe I can get script to create that address for every user in specific OU?

Anyone got that? :)

Regards,
0
 
IvanSystem EngineerAuthor Commented:
Hi,

I have decided to use solution from http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_28230622.html 

Just will edit *.scv to hold username and will use command

GC C:\proxy.csv | % {
Set-ADUser $_ -Add @{ProxyAddresses="SMTP:$_@mydomain.org"}
}

Thanks.
Regards,
0
 
IvanSystem EngineerAuthor Commented:
I have decided to use solution from http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_28230622.html 
by member Subsun.

Regards.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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