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

One of the commands import or export is required.

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

 

Yes

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>

oauth2ClientId

i

Yes

OAuth2 client id.

You must specify the identifier after the command.

--oauth2ClientId <Client ID>

oAuth2ClientSecret

s

Yes

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.

--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 oAuth2ClientId 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> --oauth2Uri <uri_of_oauth2> --oauth2ClientId <client_id> --oauth2ClientSecret <client_secret> --filePath <path_to_file>

Import everything

Imports all configuration settings from the export file.

Kmd.WZIE.exe import --odataUri <uri_of_odata> --oauth2Uri <uri_of_oauth2> --oauth2ClientId <client_id> --oauth2ClientSecret <client_secret> --filePath <path_to_file>

Partial export

Exports the OfficeConfiguration only.

Kmd.WZIE.exe export --partialConfiguration OfficeConfiguration --odataUri <uri_of_odata> --oauth2Uri <uri_of_oauth2> --oauth2ClientId <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 --oauth2Uri<uri_of_oauth2> --oauth2ClientId <client_id> --oauth2ClientSecret <client_secret> --filePath <path_to_file>

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).