Creating Static Patch Categories

Creates a Static Patch Category object.


Hint: Static Patch Categories can only be created directly in the context of the Patch Library folder.


Examples:


Hint: The execution of these examples requires a connected PowerShell drive.


Create a Static Patch Category named "System-Tools" in the "Patch Library" context:


New-EmdbPatchCategory "emdb:\rootDSE\Global Software Library\Patch Library\System-Tools" 


Create a Static Patch Category named "Office" in the current context:


Cd "emdb:\rootDSE\Global Software Library\Patch Library"

New-EmdbPatchCategory "Office"


Creation of a Static Patch Category named "Graphic Editors" in the context "Global Software Library\Patch Library" using the New-Item cmdlet. Besides the ItemType, the value of the TargetCategory has to be specified. The following examples shows a possible way:


New-Item -Path "emdb:\rootDSE\Global Software Library\Patch Library" -Name "Graphic Editors" -ItemType "PatchMgmtRuleFilter" -Value @{TargetCategory="VMWPPatchPackage"}


Hint: In the context of the emdb drive, the cmdlet New-Item provides the additional parameter -DelayCreation. Using this parameter creates the object on the client side only and doesn't propagate the changes to the DSMDB instantly. Now you can manipulate properties of this object and finally the changes can be propagated to the DSMDB by calling the method Create(). This is an alternative way of specifying the value of the TargetCategory property.


Example:


Cd "emdb:\rootDSE\Global Software Library\Patch Library"

$MyNewPatchCategory = New-Item "Viewer" -ItemType "PatchMgmtRuleFilter" -DelayCreation

$MyNewPatchCategory.TargetCategory = "VMWPPatchPackage"

$MyNewPatchCategory.Create()