Removing Variable-Groups

Userdefined Variable-Groups are deleted using the Remove-EmdbVariableGroup cmdlet or the object's Delete()-method.


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

The following command deletes the Variable-Group "InternalData" using the Remove-EmdbVariableGroup cmdlet:

Remove-EmdbVariableGroup "InternalData"

The following example first retrieves the userdefined Variable-Group "InternalData" and deletes the object subsequently:

$MyVariableGroup = Get-EmdbVariableGroup "InternalData"


In order to delete all userdefined Variable-Groups, the code shown below can be used, for example:

Get-EmdbVariableGroup | Where-Object {$_.IsSystem -eq $false} | ForEach-Object {$_.Delete()}

Note: As long a a Variable-Group contains userdefined Variables, it cannot be deleted. You have to delete all associated Variable-Definitions first, as described here.

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