VMware Cloud Community
kbinger
Contributor
Contributor
Jump to solution

Using PowerCLi to Obtain OS Version

PowerCLi Bretheren -

 

I'm trying to use PowerCLi to get the actual OS version, or in the case of Linux, release. For example, I can use $vm.guest.osfullname to get the correct OS kernel but in the case of CentOS instances it returns a rather generic response: CentOS 4/5/6/7 (64-bit); whereas the actual OS is CentOS Linux release 7.2.   Even if it could just narrow it down to CentOS 7 I'd be satisfied, but 4/5/6/7 seems far too ambiguous to be of any help.

Any assistance is much appreciated.

- Karl

 

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

The OS version reported by the VMware Tools is not always spot on I'm afraid.

I now always use something like 'uname -a' through Invoke-VMScript.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

The OS version reported by the VMware Tools is not always spot on I'm afraid.

I now always use something like 'uname -a' through Invoke-VMScript.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
zsoltesz
Enthusiast
Enthusiast
Jump to solution

You can find information about more precise OS versions on this page: https://blogs.vmware.com/vsphere/2016/10/introducing-vmware-tools-10-1-10-0-12.html

Zoli

kbinger
Contributor
Contributor
Jump to solution

That is the next best thing!  Thank you (again) LucD.

Reply
0 Kudos