Run the Export/Import application

WorkZone Export/Import has a command line interface based on a command and its associated attributes. The commands must follow this structure:

Kmd.WZIE.exe <command> <attributes>

where the command specifies the main action of WorkZone Export/Import. Usually, the commands are either export or import but help or version commands can also be specified.

Commands and attributes

The export and import commands and attributes are listed in the tables below.

Commands

Command Description

export

Exports WorkZone configuration settings from the database to a JSON file.

import

Imports WorkZone configuration settings from the export JSON file into the database.

--help

Displays information about a specific command.

--version

Displays version information.

Attributes

You can use the attributes by their names or short one-letter names.

Attribute Short name Required Description Syntax 1
odataUri

 

Yes

URI to OData.

You must specify the URI after the command.

--odataUri <OData URI>

oauth2Uri

 

Only required for OAuth

URI to OAuth2.

You must specify the URI after the command.

--oauth2Uri <OAuth2 URI>

filePath

f

Yes

Path of the exported file.

You must specify the path after the command.

--filePath <File path>

authorizationType

 

Yes

Specify the authorization type that you use in your WorkZone instance. This could, for example, be MicrosoftIdentity (Entra ID), NTLM, or wzOAuth2.

--authorizationType <Authorization type>

clientId

 

Required for Entra ID and OAuth

Specify your client ID of Entra ID or OAuth.

--clientId <00000000-0000-0000-0000-000000000000>

tenantID

 

Yes, for single tenant applicaitons

Specify your tenant ID of Entra ID. Only required for single tenant applications and cannot be used in multi tenant applications.

--tenantId <00000000-0000-0000-0000-000000000000>

aadAuthorityAudience

 

No

Use this attribute to specify the combination of organizations that are involved in the authentication setup.. See this Microsoft page for a full list of settings options.

--aadAuthorityAudience <AzureMultipleOrgs>

azureCloudInstance

 

No

Use this attribute to specify the type of cloud instance, your setup is running on. See this Microsoft page for a full list of settings options

--azureCloudInstance <AzurePublic>

oAuth2ClientSecret

s

Only required for OAuth

The OAuth client secret

--oAuthClientSecret

executeOperationsOneByOne

 

 

Executes each operation in a separate batch. Note that it can affect the performance.

If the attribute is not set, the export operations will be divided into batches according to the entities they work on and the type of action, such as insert, update, and so on.

--executeOperationsOneByOne

partialConfiguration

 

 

Partial configuration items.

You must define the configuration's partial export name after the command.

See Supported configurations or the list of supported configurations at the bottom of the help screen.

--partialConfiguration <partial export name>

help

 

 

Displays a help screen with short descriptions of commands and their attributes.

--help

version

.

 

Displays version information. See Version

--version

1  -- is two dashes. Separate the variable (second) half of the attribute from the first with a single space. Do not include the angle brackets ( < >) in the command attributes. Commands are case-sensitive.

Version

Displays the version of the WorkZone Export/Import application.

You must provide either clientId with oAuth2ClientSecret . If you want to use the current user account in the NTLM setup, the WorkZone Export/Import can be launched without authentication info, for example:

\Kmd.WZIE.exe --version

Examples

Export everything

Exports all supported configuration settings and place the export file at a specific location. 

Kmd.WZIE.exe export --odataUri <uri_of_odata> --authorizationType MicrosoftIdentity --clientId 00000000-0000-0000-0000-000000000000 --filePath <path_to_file>

Import everything

Imports all configuration settings from the export file.

Kmd.WZIE.exe export --partialConfiguration OfficeConfiguration --odataUri <uri_of_odata> --authorizationType MicrosoftIdentity --clientId 00000000-0000-0000-0000-000000000000 --filePath <path_to_file>

Partial export

Exports the OfficeConfiguration only.

Kmd.WZIE.exe export --partialConfiguration OfficeConfiguration --odataUri <uri_of_odata> --oauth2Uri <uri_of_oauth2> --clientId <client_id> --oauth2ClientSecret <client_secret> --filePath <path_to_file>

Specify the target content server / OData URI

Specifies the target content server and provide the OData URI.

Kmd.WZIE.exe export --odataUri <uri_of_odata> --filePath <path_to_file>

Specify the target content server / OAuth2 URI and Client Secret

Specifies the target content server, the OAuth2 URI and the Client Secret.

Kmd.WZIE.exe export --authorizationType WzOAuth2 --oauth2Uri https://db01.lmdom.local --clientId 00000000-0000-0000-0000-000000000000 --oauth2ClientSecret 12345 <other attributes>

Specify authentication settings for NTLM

Kmd.WZIE.exe export --authorizationType NTLM <other attributes>

Specify authentication settings for Entra ID

This is the default setting for an Entra ID setup.

Kmd.WZIE.exe export --authorizationType MicrosoftIdentity --clientId 00000000-0000-0000-0000-000000000000 <other attributes>

See Also

Supported configurations

Session logging

The logging mechanism used in WorkZone Export/Import is based on the Serilog open source library. You can change the way the logs are displayed and where they are sent.

All settings for the logging of events and errors as well as the logging level can be found in the appsettings.json JSON file.

WorkZone Export/Import is by default configured to output any event logs from the session to the console. The location of the export/import log files can be changed by editing the appsettings.json JSON file.

Logging level

By default, the application will show all detailed information about the session, including messages to HTTP requests that are sent to WorkZone Content Server.

You can change the default logging level by changing the restrictedToMinimumLevel setting to reduce the amount of log messages you need to traverse to troubleshoot an issue. For example, if you change the logging level to Error, only error messages will be displayed.

See Also

For more information about Serilog, see Serilog (external web page).