I'd like to get the GuestOS of a template.
One more, how could I learn about the "library", or reference of "ExtensionData.xx"?
Thank you,
Since a template normally doesn't hold the information obtained by the VMware Tools, you can only discover the configured guest OS.
Like this
Select-Object Name,
@{N = 'OSConfigured'; E = { $_.ExtensionData.Config.GuestId } }
The ExtensionData maps the information contained in the vSphere objects.
These are documented in the VMware vSphere API Reference Documentation
There is a VMware vSphere Web Services SDK Programming Guide but that one is not really geared towards PowerCLI users.
There is a chapter on the use of the API in the PowerCLI Reference.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Since a template normally doesn't hold the information obtained by the VMware Tools, you can only discover the configured guest OS.
Like this
Select-Object Name,
@{N = 'OSConfigured'; E = { $_.ExtensionData.Config.GuestId } }
The ExtensionData maps the information contained in the vSphere objects.
These are documented in the VMware vSphere API Reference Documentation
There is a VMware vSphere Web Services SDK Programming Guide but that one is not really geared towards PowerCLI users.
There is a chapter on the use of the API in the PowerCLI Reference.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hey
This needs updating to get correct info- use :
Get-Template |Select-Object Name,@{N = 'OSConfigured'; E = { $_.ExtensionData.config.GuestFullName} }
I suspect you missed the 1st line of my reply "Since a template normally doesn't hold the information obtained by the VMware Tools, you can only discover the configured guest OS"
If the VM on which the template is based never had a chance to run the VMware Tools or the data obtained by the VMware Tools has expired, the GuestFullName property will be empty.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
nope didnt miss it- just wanted to post what worked for me.
Now others trying to find this info will have alternate options to get OS info either way. Go team 🙂