Building Blocks and Custom Resources
The executable program of the Workspace Control Console is pwrtech.exe. The command-line can be used to process Building Blocks and Custom Resources.
Consider the following when using the command-line options presented on this page:
-
Parameters between angle brackets (<>) need to be replaced with the appropriate values.
-
Parameters between square brackets ([]) are optional.
Building Blocks command-line parameters
The following command-line parameters are available for Building Block actions:

pwrtech.exe /add <path + XML filename> [/overwrite]
Imports a single Building Block into the Workspace Control Console.
Replace <path + XML filename> with the full file path of the Building Block.
Examples:
-
C:\Program Files\Ivanti\Workspace Control\pwrtech.exe /add H:\xml\security_network.xml
-
C:\Program Files (x86)\Ivanti\Workspace Control\pwrtech.exe /add H:\xml\security_network.xml
(Optional) /overwrite replaces settings and applications that already exist in the Workspace Control Console with matching settings and applications from the Building Block.
pwrtech.exe /add <path + wildcard> [/overwrite]
Imports multiple Building Blocks into the Workspace Control Console.
Replace <path + wildcard> with a wildcard file path of the Building Block.
Example:
"%respfdir%\pwrtech.exe" /add C:\export\start*.xml
In this example, the C:\export folder contains Building Blocks for all Workspace Control settings and applications. Using the wildcard * in the file path, the command imports only XML files that contain start in their filenames. This results in importing only the Building Blocks for applications included in Composition > Applications > Start Menu tab.
(Optional) /overwrite replaces settings and applications that already exist in the Workspace Control Console with matching settings and applications from the Building Block.
-
If the Building Block contains settings from the Composition node, Security > Authorized Files or Blocked Resources, add the option /overwrite to specify that these settings must replace any existing settings. If you do not add this option, all settings in the specified Building Block files are merged with the current settings in the Workspace Control Console. For more details, see Merge vs. Overwrite.
-
For the Composition node, only settings for the same type (Mapping) and level (Global) are replaced when using the /overwrite option.

pwrtech.exe /del <building block file>
Deletes all resource objects from the specified Building Block.
Replace <building block file> with the full file path of the Building Block.
pwrtech.exe /del /guid={<objectguid>}
Deletes the resource object with the specified GUID.
Replace <objectguid> with the GUID of the resource file to delete.
pwrtech.exe /del <path + XML filename>
Deletes an application from the Workspace Control Console.
Replace <path + XML filename> with the full file path of the Building Block.
Example:
C:\Program Files (x86)\Ivanti\Workspace Control\pwrtech.exe /del H:\export\startmenu_accessories_calculator.xml

pwrtech.exe /export <path> /type=(<type1>,<type2> ...)
Creates a Building Block with limited number of features.
Replace <path> with the full file path of the location where to export the Building Block.
/type specifies the wanted feature(s) (types — <type1>,<type2> ...) that need to be included in the Building Block:
-
Separate different types with a comma (,).
-
If no types are specified, a Building Block for the entire environment is created instead.
Use the following types with parameter /type in the Command-line for pwrtech.exe /export:
Type |
Feature in Workspace Control Console |
---|---|
APPLICATION |
Composition > Applications |
AUTOMATIONTASK |
Composition > Actions By Type > Automation Tasks |
CONFIGMGR |
Composition > Actions By Type > Microsoft ConfigMgr |
DATASOURCE |
Composition > Applications > Data Sources |
DIRECTORYSERVICE |
User Context > Directory Services |
|
Composition > Applications > E-mail Settings |
EXECUTECOMMAND |
Composition > Actions By Type > Execute Command |
FOLDERREDIRECTION |
Composition > Actions By Type > Files and Folders > Folder Redirection |
FOLDERSYNC |
Composition > Actions By Type > Files and Folders > Folder Synchronization |
HOMEDIRECTORY |
Composition > Actions By Type > Files and Folders > User Home Directory |
LOCATION |
User Context > Locations and Devices |
MAPPING |
Composition > Actions By Type > Files and Folders > Drive and Port Mappings |
PRINTER |
Composition > Actions By Type > Printers |
PROFILEDIRECTORY |
Composition > Actions By Type > Files and Folders > User Profile Directory |
REGISTRY |
Composition > Actions By Type > User Registry |
SUBSTITUTE |
Composition > Actions By Type > Files and Folders > Drive Substitutes |
USERSETTING |
Composition > User Settings |
VARIABLE |
Composition > Actions By Type > Environment Variables |
Examples:
-
pwrtech.exe /export C:\temp\printer.xml /type=printer
The Building Block printer.xml is created in C:\temp and only includes data from type PRINTER. -
pwrtech.exe /export C:\temp\printer_mapping.xml /type=printer,mapping
Building Block printer_mapping.xml is created in C:\temp and only includes data of types PRINTER and MAPPING.
pwrtech.exe /export <filepath> /guid={<objectguid>}
Creates a Building Block with limited number of features.
Replace <path> with the full file path of the location where to export the Building Block.
/guid creates a Building Block for one specific resource file. Replace <objectguid> with the GUID of the resource file to export. Object GUIDs are found in the Datastore.

pwrtech.exe /addresource <resourcefile> /path=<folder/sub-folder> [/guid={<objectguid>}]
Add a resource file to Custom Resources in the specified location.
Replace <resourcefile> with the full file path of the resource file to add to the Workspace Control environment.
/path specifies the location (file path) where the resource file is added in the Workspace Control Console, under Administration > Custom Resources. Replace <folder/subfolder> with the file path where to add the resource file.
-
If no path is specified, the resource file is added as a Custom Resource to the root folder at Administration > Custom Resources.
-
If the specified path does not exist, a new folder is created in the folder tree at Administration > Custom Resources and the resource file is added to that folder as a Custom Resource.
Example:
pwrtech.exe /addresource C:\temp\mine.ico /path=\mycustomresources\folder1
The resource file mine.ico is added as a Custom Resource in folder1 under the MyCustomResources folder at Administration > Custom Resources.
(Optional) /guid overwrites an existing Custom Resource. Replace <objectguid> with the GUID of the overwriting resource file.

pwrtech.exe /exportresource /target=<file> /path=<folder/sub-folder>
Exports a Custom Resource from Workspace Control and place it in the specified location.
/target specifies the location where to export the Custom Resource. Replace <file> with the full file path to the export location.
/path specifies the path in the Workspace Control Console to the Custom Resource that is exported. Replace <folder/subfolder> with the path from where to export the resource file.
If only a file name is specified, pwrtech.exe tries to extract the resource file from the root folder at Administration > Custom Resources.
Example:
pwrtech.exe /exportresource /target=C:\temp\dummy.ico /path=icons/mine.ico
The Custom Resource mine.ico is extracted from the icons folder found at Administration > Custom Resources in the Workspace Control Console and is placed as the resource file dummy.ico in C:\temp\.
pwrtech.exe /exportresource /target=<file> /guid={<objectguid>}
Exports a Custom Resource from Workspace Control and place it in the specified location.
Use /target to specify the resource file name and full path where to export the Custom Resource.
Use /guid to extract the Custom Resource that matches the specified GUID (<objectguid>).

pwrtech.exe /delresource /path=<folder/sub-folder>
Deletes a resource file from Custom Resources.
/path specifies the path in the Workspace Control Console to the Custom Resource file to delete. Replace <folder/subfolder> with the path from where to delete the resource file.
If only a file name is specified, pwrtech.exe tries to remove the resource file from the root folder at Administration > Custom Resources.
pwrtech.exe /delresource /guid={<objectguid>}
Delete a resource file from User Home Directory and User Profile Directory.
/guid removes the Custom Resource based on its GUID. Replace <objectguid> with the resource file's GUID. This is obtained from Composition > Actions By Type > Files and Folders > User Home Directory or User profile Directory > Files tab. Right-click on a resource file and then select Properties. From the Attributes window, copy the value in the GUID field.
Error levels for scripts
To facilitate these batch scripts, the following error levels are available and are returned in %errorlevel% when an error occurs:
Error level |
Description |
---|---|
0 |
The command line was executed successfully. |
1 |
The file was not specified in the command line. |
2 |
The file was not a valid XML file. |
3 |
The object was not found in the Datastore. |
4 |
Failed to save the Custom Resource in the Datastore. |
5 |
Failed to delete the object or Custom Resource. |
6 |
The /guid has an invalid GUID specified. |
7 |
The object specified with /guid does not exist. |
8 |
The Custom Resource specified with /guid does not exist. |
9 |
Insufficient rights, the caller belongs to an administrative role which does not have modify permissions for the object type or Custom Resources. |
10 |
Required command-line options not specified. |
11 |
The path specified for /path does not exist. |
12 |
Failed to import Building Block via the command line with /passwordfips, because the file name contains a wildcard (* or ? or |). |
14 |
Failed to import Building Block via the command line, because no /passwordfips is provided or the password is incorrect. |
15 |
The file could not be saved. |
16 |
The file has the wrong extension. |