Syntax
Test-Compliance [-Server <VIServer[]>] [-Entity] <InventoryItem[]> [[-UpdateType] <UpdateType[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]Related Commands
Online versionDetailed Description
This cmdlet scans inventory objects for baselines attached to them. The following object types are supported - Template, VirtualMachine, VMHost, Cluster, Datacenter, and Folder. If the inventory objects are of different types, the cmdlet starts a separate task for each object.Parameters
Return Type
VMware.VimAutomation.Types.Task[] or null If RunAsync is set, the return value is a Task object that represents the scanning task on the vSphere server. If RunAsync is not set, no value is returned.Notes
Examples
-------------- Example 1 --------------
Test-Compliance -Entity VM -RunAsync
Scans the VM virtual machine. Since the -RunAsync parameter is set, the cmdlet runs asynchronously and a Task object is returned.
-------------- Example 2 --------------
Get-Inventory -Name VM | Test-Compliance
Scans the VM virtual machine for baselines attached to it.
-------------- Example 3 --------------
Get-Inventory -Name MyHost | Test-Compliance -UpdateType HostPatch
Scans virtual machine host for patches running asynchronously.
-------------- Example 4 --------------
Get-Inventory -Name MyVM | Test-Compliance -UpdateType VmHardwareUpgrade, VmToolsUpgrade
Scan the MyVM virtual machine for upgrades.