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

Re: How to add export-csv in this simple script?

$
0
0

Sure. What I meant was modifying your script into:

 

 

$vms = import-csv c:\scripts\vms.csv

& { foreach ($vmname in $vms)

{

get-vm $vmname.name | Select Name,@{N="cluster";E={Get-cluster -VM $_}}

}} |

Export-Csv -NoTypeInformation -useculture C:\scripts\vminfo1.csv


Viewing all articles
Browse latest Browse all 230663

Trending Articles



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