VMware Cloud Community
bvi1006
Enthusiast
Enthusiast
Jump to solution

Make sure the host version is 5+ before building a vm during automation

Hi,

I am using PS for WebAccess to build vms. Our cluster has 4.x hosts which will not support Windows 2012. In the script, I choose a host based upon some criteria, such as how many vm's it is already hosting, etc. ... But now that we have 5.x I have to be sure the host is 5.x before attempting to build a Windows 2012 vm. Is there a simple way to do this? I've poked around and not found anything really simplistic for my situation.

Thanks for any help!

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You can use the Version property that is returned by Get-VMHost

Get-VMHost | Select Name,Version


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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

You can use the Version property that is returned by Get-VMHost

Get-VMHost | Select Name,Version


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

0 Kudos
bvi1006
Enthusiast
Enthusiast
Jump to solution

oh sorry, that was way to easy. I just couldn't find the answer thank you so much Luc :smileyblush:

0 Kudos