Retrieving Patch-Template-Rules
Retrieving Patch-Template-Rules
Retrieves Patch-Template-Rule objects.
Examples:
Hint: The execution of these examples requires a connected PowerShell drive. |
All Patch-Template-Rules defined can be retrieved using the cmdlet Get-EmdbPatchTemplateRule.
Get-EmdbPatchTemplateRule |
As with other cmdlets, too, the returned Patch-Template-Rule-objects can be filtered. the following example just retrieves the 'Mozilla Firefox' object:
Get-EmdbPatchTemplateRule -Path "Mozilla Firefox" |
or alternatively (and more easily)
Get-EmdbPatchTemplateRule "Mozilla Firefox" |
Retrieve the Patch-Template-Rule "Adobe Flash Template" through its Item-ID (this ID will vary in different DSM environments):
Get-EmdbPatchTemplateRule -ItemID 10820 |
Tip: the alias ID can be used instead of ItemID. |
Note: Note that Patch-Template-Rule-objects are Catalog-objects contained in rootCatalog and are therefore not part of the context rootDSE. As as consequence, 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 retrieving Patch-Template-Rule objects. When specifying the SingleItemExpected-switch it is expected, that none or exactly one object is contained in the result. If the retrieval returns more than one object, an error is raised that can be caught and handled in scripts.