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}}
That should be $_.Runtime.PowerState
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That should be $_.Runtime.PowerState
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you!