or
take a look at Retrieve and Set VM Advanced Configuration (VMX) settings add function
function Get-VMAdvancedConfiguration {
<#
.SYNOPSIS
Lists advanced configuration setting (VMX Setting) for a VM
or multiple VMs
.DESCRIPTION
The function will list a VMX setting for a VM
or multiple VMs
.PARAMETER VM
A virtual machine or multiple virtual machines
.EXAMPLE 1
PS> Get-VM MyVM1 | Get-VMAdvancedConfiguration
#>
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
$vm,
[String]$key
)
process{
if ($key) {
$VM | Foreach {
$_.ExtensionData.Config.ExtraConfig | Select * -ExcludeProperty DynamicType, DynamicProperty | Where { $_.Key -eq $key }
}
} Else {
$VM | Foreach {
$_.ExtensionData.Config.ExtraConfig | Select * -ExcludeProperty DynamicType, DynamicProperty
}
}
}
}
and run
Get-VM | ForEach-Object {
echo $_ | where { Get-VM $_ | Get-VMAdvancedConfiguration -key disk.enableUUID | where {$_.Value -eq "true"} }
}