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

Re: VMs status in the list

$
0
0

You mean something like this ?

Get-Content-PathC:\vmnames.txt|
Select@{N="VMname";E={$_}},
 
@{N="Status";E={
   
$vm=Get-VM-Name$_-ErrorActionSilentlyContinue
   
if($vm){$vm.PowerState}else{"Not found"}
  }}
 

The vmnames.txt file is assumed to have 1 name per line


Viewing all articles
Browse latest Browse all 144140

Trending Articles



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