You can download patches from a previously defined location.
Prerequisites
Verify that you are connected to a vCenter Server system.
Procedure
- Retrieve all entities from the Datacenter data center and store the result in a variable.
$entities = Get-Inventory -Location Datacenter
- Download all available patches and store the result in a variable.
- Check whether new patches are downloaded and start scanning the entities in the Datacenter data center.
if ($result.Count > 0) {
Test-Compliance -Entity $entities
}