Removing Dynamic Software Categories

Deletes the specified Dynamic Software Category object(s).


Examples:


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


Remove the Dynamic Software Category named "Microsoft Packages" from the "Global Software Library" using the method Delete():


$MySwCategory = Get-EmdbSoftwareCategory "emdb:\rootDSE\Global Software Library\Microsoft Packages"

$MySwCategory.Delete()


Remove the Dynamic Software Category named "Adobe Reader Packages" from the directory "Global Software Library\Application Library\Adobe" using the cmdlet Remove-Item:


Remove-Item "emdb:\rootDSE\Global Software Library\Application Library\Adobe\Adobe Reader Packages"


Hint: Alternatively the alias DEL can be used to remove Dynamic Software Category objects.


Starting with PSX 3.1 there was a new option implemented when deleting Software Category 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.