Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 232233

Re: powershell question

$
0
0

You can do something like this

 

$i=0
$report=@()
while ($i-neq10) {
 
$row=""|Selecta,b,c
 
$row.a=$i+1#display in first raw column 1
  $row.b=$i+2#display in first raw column 2
  $row.c=$i+3#display in first raw column 3
  $i++
 
#Add $a, $b and $c to the row $i
  $report+=$row
}

$report|Export-Csvreport.csv-NoTypeInformation-UseCulture

 

Create a $row object with the properties.

Assign the values to the properties.

Add the $row object to an array, and then export that array to a CSV file


Viewing all articles
Browse latest Browse all 232233

Trending Articles



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