Using the InsightCM Console Application


The InsightCMConsole application is a command line utility used to interact with the InsightCM Server. It gives users the ability to send commands directly to the InsightCM server application, and exposes additional functionality not available in the web application. The console is used extensively for batch configuration changes, troubleshooting and the InsightCM SDK.


Getting Started with the Console

The console accepts user commands to import configurations, export configurations, or execute other server functions, such as data migration and data archiving. The console application is installed to the server application directory, which defaults to C:\Program Files\National Instruments\InsightCM Server 3.0. All examples in this guide use the default installation location.

To interact with the console, open a Windows command line prompt (cmd) as an administrator and navigate to InsightCM application folder using the change directory command (cd) or call the console application directly. To see all available commands, simply type InsightCMConsole in the command line to view the list of options. The list of commands will be displayed with the required option flags.

cd C:\Program Files\National Instruments\InsightCM Server 3.0
"C:\Program Files\National Instruments\InsightCM Server 3.0\InsightCMConsole.exe"

The console commands follow the below call structure. An example is also given below.
InsightCMConsole command options
InsightCMConsole exportsupportfiles -o C:\Users\Public\Documents\

Figure 1. InsightCMConsole Commands and Options

Figure 2. InsightCMConsole Commands and Options

Example Usage

To generate a technical support report for your InsightCM server, you can use the exportsupportfiles command. This command exports server logs, asset and device configuration to a zip file specified by the -o option. This zip file can then be sent to NI Support to help diagnose issues with the server.
InsightCMConsole exportsupportfiles -o C:\Users\Public\Documents\

Another example usage is importing and exporting the TDMS Directories document from the Server Configuration collection. The first command exports the TDMS storage location to a JSON file, which the user can modify. The second command imports the updated file, which update the TMDS storage location in the InsightCM configuration database.
InsightCMConsole.exe exportconfig -k Directories -o C:\temp\dir.json
InsightCMConsole.exe importconfig -f C:\temp\dir.json

The last example is exporting and importing a device definition, which is a common task when developing a custom device with the InsightCM SDK. The first command exports the device definition for the CMS-9068 to a JSON file named 9068.json. This file can be opened and modified to create a new device definition based on the CMS-9068. For example, the “DeviceType” property can be modified from "CMS-9068" to “CMS-9068-Custom” to create a new device definition based on a cRIO-9068. The second command imports the new definition to the InsightCM database.
InsightCMConsole exportdefinition -t device -n CMS-9068 -o C:\temp\9068.json
InsightCMConsole importdefinition -t device -f c:\temp\9068-custom.json

Figure 3. Exporting and Importing a Device Definition

List of Common Commands

Command Parameters Notes

-o [filepath]

Export all devices to an .xlsx file.

-f [filepath]

Import all devices from a specificed .xlsx file. The xlsx file must be structured as a InsightCM device spreadsheet.
exportassetspreadsheet -o [filepath] Export all assets to a .xlsx file.
importassetspreadsheet -f [filepath] Import all assets from a specificed .xlsx file. The xlsx file must be structured as a InsightCM asset spreadsheet.
movedatafiles   For InsightCM 3.2 and later. Used only during 3.2 or later installation. Moves waveform data from InsightCM database to files on disk.
Doaging   Runs see the data aging process instead of waiting for daily scheduled aging process.
exporttdms -dir [directory] -asset [top-most equipment in path to sensor] -start [start date "yyyy-mm-dd hh:mm:ss.S"] -end [end date "yyyy-mm-dd hh:mm:ss.S"] Example: InsightCMConsole exporttdms -dir C:\temp -asset "Plant A|Turbine Generator" -start "2019-07-24 22:00:00.0" -end "2019-07-25 01:00:00.0"
listdefinitions -t [type] View all definitions of a particular component type. Valid definition types are: device, module, channel, metric, instance, unit, asset, datasource, datasourceitem, capability, camera. See links for more information.
importdefinition -t [type] -f [filepath] Import a specific component definition
exportdefinition -t [type] -n [name] -o [filepath] View all definitions of a particular component type
importconfig -f [filepath] Import configuration to server configuration collection.
exportconfig -k [name] -o [filepath] Export server configuration collection for modification.
Exportsupportfiles -o [filepath]  


A team of NI engineers worldwide can provide technical support. In addition, NI’s network of partners offer installation and configuration support.

Was this information helpful?