Name | Description | Required? | Pipeline Input | Default Value |
---|
TargetType | Specifies the target type of the patch baselines you want to retrieve. The valid value is Host. This parameter is deprecated and will be removed in a following release. | false | false | |
Patch | Specifies a patch that belongs to the patch baseline you want to retrieve. | false | true (ByValue) | |
BaselineContentType | Specifies the content type of the patch baselines you want to retrieve. The valid values are Both, Dynamic, and Static. | false | false | |
Extension | Specifies that you want to retrieve only Extension patch baselines. | false | false | |
Name | Specifies the names of the patch baselines you want to retrieve. | false | false | |
Id | Specifies the IDs of the patch baselines you want to retrieve.
Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list. | false | false | |
Server | Specifies the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. | false | true (ByValue) | |
Entity | Specifies Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, and VApp objects to which the baselines you want to retrieve are attached to. | false | true (ByValue) | |
Inherit | Specifies that you want to retrieve the baselines inherited by the parent inventory entities. | false | false | |
Recurse | If set, retrieves the patch baselines attached to the child entities. This parameter can be specified only if the -Entity parameter is set, too. | false | false | |
-------------- Example 1 --------------
Get-VM -Name VMHost | Get-PatchBaseline
Retrieves all patch baselines assigned to the VMHost host.
-------------- Example 2 --------------
Get-PatchBaseline -Entity VMHost -Inherit -Recurse
Retrieves all patch baselines assigned to the VMHost host and its parent inventory object.
-------------- Example 3 --------------
$patch = Get-Patch -Id 1
Get-PatchBaseline -Patch $patch
Retrieves the patch baselines that contain the patch with ID 1.
-------------- Example 4 --------------
Get-PatchBaseline -Id 1,2,3
Retrieves the patch baselines with IDs 1, 2, and 3.