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

Get-VM to list VM name only

$
0
0

I am using following command to generate text file of all Windows servers that are powered on

Get-Vm where {$_.guest -match 'windows'} | where {$_.PowerState -eq 'PoweredOn'} | Out-File D:\Scripts\SL.txt

This generates list with following information :

Name                 PowerState Num CPUs Memory (MB)

What I really want is to generate list with name ONLY and and omit PowerState Num CPU's Memory.


Yasar


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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