Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 182126

Get-Compliance Report for a List of ESX Hosts in 1 vCenter?

$
0
0

So i have a command that works below individually. I want this to work for a list of hosts. How can i do this?

 

$vCenter = "VCENTERNAMEHERE" # vCenter FQDN

# Connect to vCenter

Connect-VIServer -Server $vCenter -User "USER" -Password "PASSWORD"

Get-Inventory -Name ESXHOSTNAMEHERE | Scan-Inventory -UpdateType HostPatch

$ESXhost = get-vmhost ESXHOSTNAMEHERE

$compliance = Get-Compliance -Entity $ESXhost -Detailed

$compliance.NotCompliantPatches | Select-Object Name,IDByVendor,Description,@{n='Product';e={$_.product | Select-Object -expandproperty Version}},ReleaseDate |

Export-Csv "C:\FOLDER\vCenterPatchReport.csv" -NoTypeInformation -UseCulture


Viewing all articles
Browse latest Browse all 182126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>