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

Does get-aduser with -select always truncate the fields?

$
0
0

I am using the following command:

get-aduser $user -Properties LastLogonDate | select sAMAccountName, DistinguishedName, LastLogonDate | Format-Table -HideTableHeaders | out-file '.\01-test.txt'

I am getting the information I am looking for, just not all of it. The table columns are padded - truncated to 39 characters (40 if you count 0 :-))

Cross-Daphne                            CN=Cross\, Daphne,OU=Users,OU=FM,OU=... 11/7/2013 7:53:00 AM

I tried replacing the | Format-Table -HideTableHeaders with | Export-CSV and ended up with a zero byte file

I would like to have the complete distinguishedName in either table or csv format.

I hope this makes sense.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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