File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ Function Get-VMHardwareVersion {
3
+ param (
4
+ [Parameter (Mandatory = $true )][String ]$ClusterName
5
+ )
6
+
7
+ $cluster = Get-Cluster $ClusterName
8
+ $envBrowser = Get-View $cluster.ExtensionData.EnvironmentBrowser
9
+
10
+ $envBrowser.QueryConfigOptionDescriptor ().key
11
+ }
12
+
13
+ Function Get-VMHardwareConfig {
14
+ param (
15
+ [Parameter (Mandatory = $true )][String ]$ClusterName ,
16
+ [Parameter (Mandatory = $true )][String ]$VMHardwareVersion
17
+ )
18
+
19
+ $cluster = Get-Cluster $ClusterName
20
+ $vmhost = $cluster | Get-VMHost | select - First 1
21
+ $envBrowser = Get-View $cluster.ExtensionData.EnvironmentBrowser
22
+
23
+ $vmHardwareConfigs = $envBrowser.QueryConfigOption ($VMHardwareVersion , $vmhost.ExtensionData.MoRef )
24
+ $vmHardwareConfigs.GuestOSDescriptor
25
+ }
You can’t perform that action at this time.
0 commit comments