Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 176561

script to get powerstate and toolstatus

$
0
0

I'm created a script and I'm having trouble getting the Powerstate it spits out nothing, if I take away Get-View I can get the powerstate.

 

Excuse my ignorance but I'm just starting to dive into powershell

 

get-cluster -Name <clustername> | Get-VM | Get-View | Select-Object @{Name="Hostname";e={$_.Name}}, @{Name="VMware Tools"; e={$_.Guest.ToolsStatus}}, @{Name="Powerstate";e={$_.PowerState}}


Viewing all articles
Browse latest Browse all 176561

Trending Articles



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