Adding Members to Static Patch Categories

Members can be added to Static Patch Categories by calling the method AddMember() of the Patch Category object.

Examples:


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


Add the Patch Package named "CHROME-108 for Google Chrome 36" as a member to the Static Patch Category named "System-Tools" in the "Patch Library":


$MyPatchCategory = Get-EmdbPatchCategory "emdb:\rootDSE\Global Software Library\Patch Library\System-Tools"

$MyPatchPackage = Get-EmdbSoftwarePackage "emdb:\rootDSE\Global Software Library\Patch Library\CHROME-108 for Google Chrome 36"

$MyPatchCategory.AddMember($MyPatchPackage)


Add all Patch Packages related to Google Chrome to the Static Patch Category "Browser":


$MyPatchCategory = Get-EmdbPatchCategory "emdb:\rootDSE\Global Software Library\Patch Library\Browser"

$MyPatchPackages = Get-EmdbSoftwarePackage "emdb:\rootDSE\Global Software Library\Patch Library\*" -Filter "(cn:IgnoreCase=*chrome*)"

$MyPatchPackages | ForEach-Object {$MyPatchCategory.AddMember($_)}