Command Line for Business Importer
These options are available when the Business Importer is run from the command line.
Syntax
InstallationPath\MGSBI.exe /SwitchName[=Value] [/SwitchName[=Value] ...]/Import
/Query
/Simulate
.
/Test
switch may be used alone, without
requiring any of the above. The full set of switches is shown below.Example
This example shows the Business Importer running on an inventory beacon in disconnected mode. The adapter file under test is in a subdirectory below the executable, and the output is redirected to an intermediate file for review.
cd C:\Program Files\Flexera Software\Inventory Beacon\
DotNet\bin\MGSBI.exe
/ConfigFile=adapters\productionImports.xml
/Import=EnterpGroups /Write="C:\temp\DataReview.xml"
- An upload manifest
- A copy of the adapter XML file
- This data file.
Options
Parameter/Switch | Switch Values | Details |
---|---|---|
/? or /Help |
Displays a list of available parameters and related material. | |
/ConfigFile= |
AdapterXMLFile | Specifies the path and file name of the adapter XML file that defines connection details and column mapping for the particular import. If the file path or file name contain any spaces, enclose the entire value in double quotation marks. If this switch is omitted, the Business Importer searches for a file called MGSBI.XML, in the same folder from which the Business Importer is executing. If a file name is defined without a path, the Business Importer looks in its execution folder; and relative paths are also relative to the execution folder. Where neither the switch nor the default file is present, or when the specified file cannot be found, execution terminates with an error. |
/Encrypt |
Encrypt all database connection strings found in the AdapterXMLFile, rewriting the XML file with the new values replacing the originals. This applies not only to the central compliance connection, but also to all other data source (Import) connections. This protects the connection information in case the adapter XML file is accessed by a hostile entity. Connection strings, once encrypted, cannot be decrypted for display in the XML file as plain text. If you need to update an encrypted connection string in the XML file, remove the encrypted content, and restore a plain text version of the connection string. Running the Business Importer again with this switch will re-encrypt the plain text connection strings in the XML file. Encryption uses AES cryptography, and the encryption key is specific to the
computer on which the encryption is run.
Important: Adapter XML
files containing encrypted connection strings cannot be used on any
other computer except the one on which encryption is performed. Adapters
must be encrypted separately on each computer on which they are used by
the Business Importer.
|
|
/Import= or /Import |
ImportName | Collect data from the data source specified in
ImportName within the AdapterXMLFile,
and load it into the database for which (in connected mode) the connection
string is also specified in the AdapterXMLFile. The import
name is case-sensitive. The second form (/Import ), without the
equals sign or a name of an import, may only be used when there is a single
import in the AdapterXMLFile. If this empty switch is used
when the AdapterXMLFile specifies multiple imports, the
import fails with an error.Tip: Only a single import may be run from
each command-line invocation.
|
/IncludeDDI |
The DDI is a different format to CSV that the MGSBI tool can utilize. If the MGSBI tool is run on a Beacon to process a package in DDI format
without the
/IncludeDDI parameter specified in the command
line, the process will fail and the following error message is
outputted:
|
|
/Log= |
One of: Silent , Critical ,
Errors , Warnings ,
Information , Debug ,
Default |
Select the kind of logging that should be output to the console.
/LogFile= switch for the Business Importer must be specified, or the ImportName
defined in the AdapterXMLFile must specify a log file,
for a log file to be written. |
/LogFile= |
LogFile | Path and file name where an additional log file may be written.
Alternatively, the
<log/> element may be specified in
the AdapterXMLFile. If both are omitted, no log file is
written (there is no default). If different values are given in the command
line and the AdapterXMLFile, both files are written.Tip: This log file does not respect the setting in the
/Log= command-line switch, and always logs
Information and higher messages. |
/OperatorLogin= |
AccountName | Used by IT Asset Management to create history records showing which operator made changes to which database elements. |
/Query= |
ImportName | Run the query specified in the import definition (in the AdapterXMLFile) against the data source and list the individual records on the console in CSV format. The case-sensitive import name is mandatory when this switch is used. |
/Read= |
DataFilePathAndName | Over-rides the connection details specified in the ImportName within the AdapterXMLFile, and instead the adapter reads data from the intermediate data file specified. This intermediate file format reflects the data structure defined in the import element ImportName in the AdapterXMLFile. This switch is for internal use in disconnected mode, where the Business Importer has written the data to the intermediate file on an inventory beacon, the intermediate file has been automatically uploaded to the central server, and now the Business Importer resumes the process by reading from the intermediate data file and continuing the import process. |
/Simulate= |
ImportName | Runs a full import (similar to the |
/TenantUID= |
UID |
Execute the import adapter for this tenant.
|
/Test |
ImportName | Test the downstream connection to the data source. The case-sensitive ImportName is mandatory when this switch is used, and identifies which connection within the AdapterXMLFile is tested. |
/Write= |
DataFilePathAndName | Over-rides any upstream connection details specified in the AdapterXMLFile for the central compliance database, and instead the adapter writes collected data to the intermediate data file specified. This intermediate file format reflects the data structure defined in the import element ImportName in the AdapterXMLFile. This switch can be used for testing. |
Obsolete switches
Turbo=[true|false]
NewMode=[true|false]
Boost=[true|false]
.
false
now produces an error similar to the
following:ERROR: The legacy import mode (switchName=false) is no longer supported
IT Asset Management (Cloud)
Current