I am trying to get the CentOS Version by PowerCLI.
I am using this cmdlt:
Get-VM | Select-Object @{N="Name";E={$_.Guest.VM}},@{N="OS";E={$_.Guest.OSFullName}} | Format-Table
It works perfect for Windows Server, but CentOS Server shows 「CentOS 4/5/6/7 (64bit)」
I want to have which version the CentOS is running on.
Does anyone know how to do it or if it is even possible...
There are 3 ways of getting the OS:
For your CentOS VM, I would first check the $vm.Guest.OSFullName property, provided VMware Tools are installed.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
There are 3 ways of getting the OS:
For your CentOS VM, I would first check the $vm.Guest.OSFullName property, provided VMware Tools are installed.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you LucD,
the Invoke-VMScript worked for me.
searching how to do it took me so long, but your
advice took me only few minutes to get the answer
big help, thank you
LucD,
$vm.Guest.OSFullName seems stopped pulling the data, we use 6.0 u3d version and its VM HW and latest VM tools running.
For all VMs, or just some of them?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference