Try this instead:
Get-Aduser -Properties telephonenumber -filter{telephonenumber -like "*"} |
Select-object * -first 2 |
foreach {set-adobject -Identity $_.distinguishedname -Replace 
@{telephonenumber="$($_.ipphone)"}}

DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE

From: [email protected] [mailto:[email protected]] On 
Behalf Of Stefan Jafs
Sent: Wednesday, July 9, 2014 10:33 AM
To: [email protected]
Subject: [NTSysADM] RE: Power Shell problem

I get the following errors:

[cid:[email protected]]

Does not seem to like Set-ADObject! Is it a permission problem?

Thanks
__________________________________
Stefan Jafs

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Damien Solodow
Sent: July 8, 2014 17:53
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


Reply via email to