Process Building Blocks and Custom Resources in batches
You can process Building Blocks and Custom Resources in batches from the Workspace Control Console (pwrtech.exe).
Command-line parameters for pwrtech.exe |
|
---|---|
pwrtech.exe /del <buildingblock file> |
Any object that is in the specified Building Block (<buildingblock file>) will be deleted.
|
pwrtech.exe /del /guid={objectguid} |
Delete the object with the GUID as specified between {...}. |
pwrtech.exe /export <filepath> [/type=(type1,type2....) | /guid={objectguid} ] |
Create Building Block with limited number of features.
Examples: pwrtech.exe /export C:\temp\printer_mapping.xml /type=printer,mapping -> Building Block with only data of Types PRINTER and MAPPING will be created.
|
pwrtech.exe /addresource <resourcefile> /path=Ivanti\Workspace Control [/guid={guid}] |
Add a resource file as a Custom Resource in the specified location.
Example: pwrtech.exe /addresource C:\temp\mine.ico /path=\mycustomresources\subfolder -> The resource file mine.ico will be added as a Custom Resource in "sub-folder" at Administration > Custom Resources in the MyCustomResources folder.
|
pwrtech.exe /exportresource /target=<file> [/path=Ivanti\Workspace Control | /guid={guid}] |
Export a Custom Resource from Workspace Control and place it in the specified location.
Example: pwrtech.exe /exportresource /target=C:\temp\dummy.ico /path=mine.ico -> the Custom Resource mine.ico will be extracted from the root folder at Administration > Custom Resources in the Console and be placed as the resource file dummy.ico at C:\temp\. |
pwrtech.exe /delresource [/path=Ivanti\Workspace Control | /guid={guid}] |
Delete a Custom Resource file from Workspace Control.
|
The following Types can be used with /type in the Command line for pwrtech.exe /export:
Type |
Feature in Management 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 |
To facilitate these batch scripts, the following error levels are available and will be returned in %errorlevel%:
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 |
Saving the Custom Resource in the Datastore failed. |
5 |
Deleting the object or Custom Resource failed. |
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 |
Importing a Building Block via the command line with /passwordfips failed, because the file name contains a wildcard (* or ? or |). |
14 |
Importing a Building Block via the command line failed, because no /passwordfips is provided or the password is incorrect. |