Removing Software-Shop Folders

Deleting Software-Shop Folders is done via the Remove-EmdbSoftwareShopUiFolder cmdlet or via the object's Delete()-method.


Examples:


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


In order to delete the Software-Shop Folder named "Office" you can use the following command:


Remove-EmdbSoftwareShopUiFolder "Office"


When using the Delete()-method, the code for deleting the Software-Shop Folder named "Imaging" would have to look like this for example:


$MySWShopFolder = Get-EmdbSoftwareShopUIFolder "Imaging"

$MySWShopFolder.Delete()


Note: Note that Software-Shop Folders are not part of the context rootDSE and therefore they can be referenced without a full qualified path resp. an absolute path.


If you are using the Remove-Item cmdlet for the deletion, you have to specify the path. Objects of this type are located in the folder rootCatalog (and in a flat list there). In order to delete the Software-Shop Folder "Viewer", you can use the following code:


Remove-Item "emdb:\rootCatalog\Viewer"


Hint: Alternatively the alias DEL can be used to remove Software-Shop Folder objects.


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