Retrieving Software Folders

Retrieves the specified Software Folder(s).


Examples:


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


Retrieve the Software Folder named "Adobe" from "Global Software Library\Application Library":


Get-EmdbSoftwareFolder "emdb:\rootDSE\Global Software Library\Application Library\Adobe"


Retrieve a sorted list of all Software Folders from "Global Software Library\Application Library" and subordinated directories:


Get-EmdbSoftwareFolder "emdb:\rootDSE\Global Software Library\Application Library\*" -Recurse | Sort-Object


Retrieve the Software Folder "Microsoft" in the current context through its Item-ID (this ID will vary in different DSM environments):


Get-EmdbSoftwareFolder -ItemID 8333 -Recurse


Tip: the alias ID can be used instead of ItemID.


Retrieve the Software Folder "Adobe" from the current context using the cmdlet Get-Item:


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

Get-Item "Adobe"


Retrieve all Software Folders from "Global Software Library\Application Library\Microsoft" and subordinated directories using the cmdlet Get-ChildItem:


Get-ChildItem "emdb:\rootDSE\Global Software Library\Application Library\Microsoft" -Filter "SchemaTag=SwFolder" -Recurse


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