Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, January 4, 2013 6:29 PM
I can get and add values to the phone number field for users, but I can't figure out how to access the "Other" field under phone number. Any suggestions would be helpful!
Thanks,
Eric
All replies (7)
Friday, January 4, 2013 6:42 PM ✅Answered | 2 votes
1) get Get-ADUser kazun -prop othertelephone2) addSet-ADUser kazun -Add @{othertelephone=22222}3) replace Set-ADUser kazun -replace @{othertelephone=22222,3333}4) delete Set-ADUser kazun -remove @{othertelephone=3333}5) clearSet-ADUser kazun -clear othertelephone
Tuesday, January 8, 2013 6:20 PM ✅Answered
Sorry for the follow up question. How can I export this and other values to a CSV file?
I've tried:
Get-ADUser -Filter * -Properties othertelephone | export-csv c:\bin\test.csv
I don't see the value for othertelephone unfortunately.
Thanks,
Eric
othertelephone - it's an array
Get-ADUser -Fi * -prop othertelephone | select name,@{n="othertelephone";e={$_.othertelephone -join ";"}} | export-csv -notype C:\bin.test.csv
Friday, January 4, 2013 6:52 PM
Excellent!!!!
Thanks,
Eric
Tuesday, January 8, 2013 6:04 PM
Sorry for the follow up question. How can I export this and other values to a CSV file?
I've tried:
Get-ADUser -Filter * -Properties othertelephone | export-csv c:\bin\test.csv
I don't see the value for othertelephone unfortunately.
Thanks,
Eric
Tuesday, January 8, 2013 6:24 PM
Excellent! Thanks for the quick response. I'll have to refresh myself with the middle portion of the commands!
Eric
Wednesday, July 12, 2017 2:07 PM
How to add into this script, to get only "Enabled" users? Thanks
Wednesday, July 12, 2017 3:00 PM
This thread has been closed for years. Please open a new question. It is also not a good idea to ask questions on other users posts.
\(ツ)_/