Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

How to display otherHomePhone AD attribute in my script

$
0
0

Below is a quick script I need to run on our AD users.  Everything seems to work except the otherHomePhone attribute since its a multivalue attribute.  We currently only have one value in this attribute in every AD account.  The output gets put into a CSV file. 

Get-ADUser -Filter {(ObjectClass -eq "user")} | Select-Object GivenName,Surname,SamAccountName,mail,otherHomePhone | Export-Csv -NoType "test.csv"

I get the following in the otherHomePhone column:

Microsoft.ActiveDirectory.Management.ADPropertyValueCollection




http://techwithmike.com


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>