This is what worked:
Get-ADUser -Filter * -SearchBase "OU=xxxx,OU=Accounts,DC=xxxx,DC=com"
-Properties telephoneNumber, ipPhone |
ForEach-object { Set-ADUser -Identity $_ -Replace @{ipPhone=$_.telephoneNumber}
}
There just changed 300 users in a few min.
Thanks
__________________________________
Stefan Jafs
From: [email protected] [mailto:[email protected]] On
Behalf Of Stefan Jafs
Sent: July 8, 2014 19:40
To: [email protected]
Subject: [NTSysADM] RE: Power Shell problem
Perfect, thanks
__________________________________
Stefan Jafs
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Frank Ress
Sent: July 8, 2014 18:20
To: [email protected]<mailto:[email protected]>
Subject: [NTSysADM] RE: Power Shell problem
I'd also highly recommend the Softerra LDAP browser - there's a free version,
and it's just a great little tool for poking around in LDAP databases. I don't
have the url offhand, but a little Google foo will get you there. If you're
doing work against AD, it's a 'gotta have'.
Frank Ress
Gas Technology Institute
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Damien Solodow
Sent: Tuesday, July 08, 2014 4:53 PM
To: [email protected]<mailto:[email protected]>
Subject: [NTSysADM] RE: Power Shell problem
Turn on Advanced Features in ADUC and click the "Attribute Editor" tab on a
user. It will list *all* the attributes and their values.
However, I have a script that uses those fields so I happen to know them off
hand. :)
IP Phone: ipphone
Telephone Number: telephoneNumber
DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Stefan Jafs
Sent: Tuesday, July 8, 2014 5:46 PM
To: [email protected]<mailto:[email protected]>
Subject: [NTSysADM] Power Shell problem
OK so I need to copy Telephone Number: to IP phone: in Active Directory 2003. I
have this:
http://blogs.technet.com/b/ashleymcglone/archive/2012/07/23/how-to-copy-user-attributes-to-another-field-with-powershell.aspx
However how do find the field names to change the above to the appropriate
fields that I want to copy?
Thanks
__________________________________
Stefan Jafs
________________________________
This communication is for the use of the intended recipient only. It may
contain information that is privileged and confidential. If you are not the
intended recipient of this communication, the disclosure, copying, distribution
or use hereof is prohibited. If you have received this communication in error,
please advise me by return e-mail or by telephone and then delete it
immediately.