Hi- I am using below script. Need help in modifying below or new script to give me gust OS information as well for each VM along with Tools information.
Get-Cluster -name "clustername" | Get-VM | Get-View | Select-Object @{N="Name";E={$_.Name}},@{Name="ToolsStatus";E={$_.Guest.ToolsStatus}}
Thanks!
Vinod
Try this
Get-Cluster -name "clustername" | Get-VM | `
Select-Object @{N="Name";E={$_.Name}}, @{Name="ToolsStatus";E={$_.Extensiondata.Guest.ToolsStatus}}, @{N="OS";E={$_.Guest.OSFullName}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LuCD..
Script worked fine, the only thing is, wherever Tools are installed OS information is populated. Is it possible to get OS information for all VMs with or without tools.
Names ToolsStatus OS
--------------- ----------------------- ---------------
You can also display the OS as it was selected during the creation of the guest.
But you can't really rely on what this says.
Btw this value is used to look up certain defaults for the guest.
Get-Cluster -name "clustername" | Get-VM | `
Select-Object @{N="Name";E={$_.Name}}, @{Name="ToolsStatus";E={$_.Extensiondata.Guest.ToolsStatus}}, @{N="OS";E={$_.Guest.OSFullName}}, @{N="OS selected";E={$_.Extensiondata.Config.GuestFullName}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Getting below error when executing the script.
I suspect there is a blank after the back-tick.
Some editors seem to have problems with that
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
can you provide this in a script file please.Thanks!
Sure
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I just changed the cluster name in script and still getting same error.
Try this one, I made sure there is no blank at the end of the first line
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
cool!! It worked. Thanks! a lot again.