These advanced settings are normally present with the default values.
Do you want to look for those that have the default settings?
If yes, you could do something like this
$adv = @{
'NFS.MaxQueueDepth' = 4294967295
'NFS.MaxVolumes' = 32
'SunRPC.MaxConnPerIP' = 32
}
Get-VMHost -PipelineVariable esx |
ForEach-Object -Process {
$result = $adv.GetEnumerator() | ForEach-Object -Process {
(Get-AdvancedSetting -Name $_.Name -Entity $esx).Value -eq $_.Value
}
if($result -contains $false){
$obj = [ordered]@{
VMHost = $esx.Name
}
$adv.GetEnumerator() | ForEach-Object -Process {
$obj.Add($_.Name, (Get-AdvancedSetting -Name $_.Name -Entity $esx).Value)
}
New-Object -TypeName PSObject -Property $obj
}
}