Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

piping variable into export-csv gives junk data

$
0
0

I'm grabbing servername and when created from each of our domains then combing that data and trying to output it to a csv

example

Powershell
$computer1=Get-ADComputer-filter{OperatingSystem-Like"Windows *Server*"}-SearchBase"dc=domain1,dc=com"-Property*|ftname,whencreated-HideTableHeaders$computer2=Get-ADComputer-filter{OperatingSystem-Like"Windows *Server*"}-SearchBase"dc=domain2,dc=com"-serverserver2-Property*|ftname,whencreated-HideTableHeaders$computer=$computer1+$computer2$computer|export-csv-notypec:\temp\output.csv

When I check what's in each computer variable is the correct format table data.

But the csv has

ClassId2e4f51ef21dd47e99d3c952918aff9cd

pageHeaderEntry

pageFooterEntry

autosizeInfo

shapeInfo

groupingEntry

033ecb2bc07a4d43b5ef94ed5a35d280

...


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

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