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

Expand columns new-object psobject

$
0
0

I am trying to get 3 variables out to a table but the columns are truncating. The variables are coming from two get-wmiobject cmds. I am building a table with:

$out = new-object psobject

$out | add-member -Membertype noteproperty -Name User -Value $User.UserName
$out | add-member -Membertype noteproperty -Name ComputerName -Value $User.Name
$out | add-member -Membertype noteproperty -Name Printers -Value $PrinterInfo.Name
$out

I have tried to send it out to a csv with $out | 'Export-CSV PATH -Append' but I get System.Object[] for one column in the csv file. Any help would be appreciated.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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