Removing Patch-Rollout-Rules
Removing Patch-Rollout-Rules
This chapter describes deleting Patch-Rollout-Rule-objects.
Examples:
Hint: The execution of these examples requires a connected PowerShell drive. |
To delete Patch-Rollout-Rule-objects, the Remove-EmdbPatchRolloutRule cmdlet is used. The Rule "Critical Updates", that was created beforehand, can be deleted using the following commands:
Remove-EmdbPatchRolloutRule "Critical Updates" |
Alternatively, the Delete()-method of the corresponding object can be used, as the following example shows:
$MyPatchRolloutRule = Get-EmdbPatchRolloutRule "Java" $MyPatchRolloutRule.Delete() |
Remove the Patch-Rollout-Rule named "Adobe-Updates" using the cmdlet Remove-Item:
Remove-Item "emdb:\rootCatalog\Adobe-Updates" |
Note: Note that Patch-Rollout-Rule-objects are not part of the context rootDSE and therefore they can be referenced without a full qualified path resp. an absolute path. |
Starting with PSX 3.1 there was a new option implemented when deleting Patch-Rollout-Rule objects. When specifying the SingleItemExpected-switch it is expected, that none or exactly one object is affected. If the command would delete more than one object, an error is raised that can be caught and handled in scripts.