Below is the list of Miradore Command line tool commands. You can get the same list from the Command line tool by typing mdcmd ?. Every command is implemented for various target objects. All objects and their available commands are listed below on the popup menu. You can also get the list of available objects by typing mdcmd <command> ?. Every command - object pair has different parameters available. Those parameters are not listed in this document but you can get them by typing mdcmd <command> <object> ?.
Creates new object. You have to provide at least the required parameters of current object. The values of parameters which are not provided are left empty or default values are used if they exist. Return value of command line tool is ID of the created object (greater than 0) or if error occurs, value that indicates the error (equal or less than 0).
Updates an existing object. Target object's ID is needed to define the object that will be updated. The values of provided parameters are updated and the others are not changed. Return value of command line tool is ID of the updated object (greater than 0) or if error occurs, value that indicates the error (equal or less than 0).
Gets data about target object. Parameters are used to filter results and only objects with matching parameter values are received. Command line tool has various output formats, see How to use Command line tool for details. Return value of command line tool is ID of the first found object (greater than 0) or if error occurs, value that indicates the error (equal or less than 0).
Notice! If filtering parameter contains spaces, it must be surrounded by "-characters. For example: mdcmd get package -fn "Adobe Reader%"
Removes target object. Parameters are used to filter objects and all objects with matching parameters are removed.
Exports target object from Miradore to xml file. See XML import / export below.
Imports objects from XML file to Miradore. See XML import / export below.
List of objects and commands which are
implemented for them
Object |
Full name |
get |
create |
update |
remove |
Description |
actionparms |
Action parameters |
x |
|
|
|
This defines which parameters are available for a specific action. |
actions |
Actions |
x |
|
|
|
Built-in actions which can be attached to software packages. |
assetconfig |
Asset configuration |
x |
x |
x |
|
Asset configuration has information about some specific device. Asset must be linked to 'hw' which must be created earlier. |
cli_deploymentqueue |
Client deployment queue |
x |
|
x |
x |
This has list of devices which are set to Miradore Client deployment queue. Miradore Client will be installed to those devices. |
clientsetting |
Client setting |
x |
|
|
|
Client setting item. |
contract |
Contract |
x |
x |
|
|
Contract item. |
contractdeviceconfig |
Contract - Device configuration |
x |
x |
|
|
This links contracts to assets using asset's DeviceConfigID |
costcenter |
Cost center |
x |
x |
|
|
Cost center item. |
deviceconfigasset |
Device configuration - Asset |
x |
x |
|
|
This links assets to device configurations. |
deviceconfigdeviceusage |
Device configuration - Device usage |
x |
x |
|
x |
This links device usage to device configuration. |
devicerole |
Device role |
x |
x |
|
|
The device role is a high level explanation of the use of a device configuration. The role can be for example server, office PC, special PC, network device, or network printer. You can modify or delete predefined device roles or create your own. The device role is always chosen wherever packages can be attached. Packages are always attached to a device role and to the operating system. |
deviceusage |
Device usage |
x |
x |
|
|
The device usage explains the use of a device configuration in a more detailed level than the device role. The usage can be for example Personal, Spare, Shared, Classroom PC, etc. You can modify or delete predefined device usages or create your own. All device usages are categorized based on the device role, which must be chosen when creating a device usage. |
financialtransaction |
Financial transaction |
x |
x |
|
|
Assets configuration's financial transaction. |
hw |
Asset model item |
x |
x |
|
|
Hardware basic data. See Asset model item. |
hwcategory |
Hardware category |
x |
x |
|
|
The hardware category is used for categorizing hardware models and for attaching default settings. The hardware category is selected when creating a new hardware basic data item. |
hwmanufacturer |
Hardware manufacturer |
x |
x |
|
x |
Hardware manufacturer. |
instpoint |
Installation point |
x |
x |
|
|
Installation point. See Installation point. |
inv_asset_xml |
Asset xml inventory |
x |
x |
x |
x |
Custom inventory reports about assets. |
location |
Location |
x |
x |
x |
|
Location. |
org |
Organisation |
x |
x |
|
|
Organisation. |
os |
Operating system |
x |
x |
|
|
Operating system. |
package |
Package |
x |
x |
x |
|
Data about software packages which can be installed using Miradore. |
packageactionparms |
Package action parameters |
x |
x |
x |
|
This defines parameters of a specific package action. |
packageactions |
Package actions |
x |
x |
x |
x |
This defines which actions are defined for a specific package. |
packageos |
Package operating system |
x |
x |
|
|
This defines which operating systems are available for a specific package. |
packagescript |
Package script |
x |
x |
|
|
Package Script. |
packageuninstalltargets |
Package uninstall targets |
x |
x |
|
|
This defines uninstall package's targets which it uninstalls. |
qix |
Quality index |
x |
x |
x |
|
Quality index report. |
qixindicator |
Quality index indicator |
x |
|
|
|
Quality index indicator. |
qixqixindicator |
Quality index - Quality index indicator |
x |
x |
|
x |
This links Quality index indicators to Quality index. |
qixscope |
Quality index - Quality index scope |
x |
x |
|
x |
This links Quality index scope items to Quality index. |
reglang |
Regional language |
x |
|
|
|
Built-in data about regional and language settings. |
status |
Status |
x |
|
|
|
Status has all possible statuses of different objects. |
subnet |
Subnet |
x |
x |
|
|
Subnet. |
sw |
Managed software |
x |
x |
x |
|
Basic information about managed software. |
swmanufacturer |
Software manufacturer |
x |
x |
|
x |
Software manufacturer. |
syssettings |
System settings |
x |
|
|
|
Miradore system settings. |
timezone |
Timezone |
x |
|
|
|
Built-in data about time zones. |
types |
Types |
x |
|
|
|
Types has all possible values of object types. |
usr |
User |
x |
x |
x |
|
User. |
vendor |
Vendor |
x |
x |
|
|
Vendor of a device. |
videosettings |
Video settings |
x |
x |
|
|
Video settings. |
virusalert |
Virus alert |
|
x |
|
|
Data about virus alerts which are registered to Miradore. |
Export command
Export command can be used to export objects from Miradore to XML file. It requires exported object's name and file name as parameters. Exported objects can be filtered using the parameters of target object's get command. Command line tool creates an XML file with given file name and writes all found objects to that file. Existing file with same name is overwritten. Some of the objects parameter are defined so that they are not exported. Such parameters are for example the IDs of objects.
Examples
mdcmd.exe export xml -O usr -F users1.xml
Exports all users to users1.xml file.
mdcmd.exe export xml -O usr -F users2.xml -l EMEA/Finland -s active
Exports all users which location is EMEA/Finland and status is active to users2.xml file.
Import command
Import command can be used to import objects to Miradore. Those objects must be defined in XML file that can be created by export command or some external tool. Import command requires the name of imported file as a parameter.
Notice! If imported file contains non-ascii characters (like ä, ö or €), it must be UTF-8 encoded.
Example
mdcmd.exe import xml -F users1.xml
Imports all objects that are defined in users1.xml.
The format of XML document
Command line tool uses predefined format in XML documents that it exports and imports. A single document can contain one or multiple objects which types can vary. Document's root element is named Items which contains all handled objects as child elements. The name of a object element must be one of the object names listed below. Object parameters are inside object element as child elements which name is parameter's name. Many objects have other objects as parameters (like user has location). These child objects can have parameters just as independent objects. Easy way to get examples about valid XML documents is to export some existing object.
If the following XML document is imported, device configuration and all it's child objects defined in the document are searched from Miradore. If they don't exist new ones are created.
<Items>
<AssetConfig>
<Status>Active</Status> <!-- Default: Active -->
<AssetName>TestAsset1</AssetName>
<SerialNo>12345</SerialNo>
<UsrID>
<WindowsUID>AssetPurchaser</WindowsUID>
</UsrID>
<OrgID>
<Name>Asset organisation</Name>
</OrgID>
<LocationID>
<Name>Asset location</Name>
</LocationID>
<HWID>
<Status>Active</Status> <!-- default = Active -->
<HWCategory>
<Name>HW category name</Name>
</HWCategory>
<HWManufacturer>
<Name>Manufacturer name</Name>
</HWManufacturer>
<Model></Model>
<Type></Type>
<Description></Description>
</HWID>
<InstallationStatus>Allowed</InstallationStatus>
<DeviceName>TestDevice1</DeviceName>
<DeviceRole>
<Name>Workstation</Name>
</DeviceRole>
<DeviceUsageID>
<Name>TestUsage</Name>
<Description>description</Description>
</DeviceUsageID>
<OSID></OSID> <!-- If empty, DeviceRole's default operating system is used. -->
<RespUsrID>
<WindowsUID>TestUser</WindowsUID>
<Firstname>FName</Firstname>
<Lastname>LName</Lastname>
<OrgID>
<Name>Organisation name</Name>
</OrgID>
<LocationID>
<Name>User location</Name>
</LocationID>
<Email>email address</Email>
</UsrID>
<SharedUserid></SharedUserid>
<LocationID>
<Name>Device location</Name>
</LocationID>
<RegLang>
<LanguageName>Finnish</LanguageName> <!-- Use 'mdcmd.exe get reglang' to get list of available languages -->
</RegLang>
<DHCP>0</DHCP> <!-- 1 = dhcp is enabled, 0 = dhcp is not enabled, default = 1 -->
<IPAddress>123.145.167.189</IPAddress>
<SubnetID>
<TCPIP>111.222.111.0</TCPIP>
<SubnetMask>255.255.225.0</SubnetMask>
<Gateway>1.1.1.1</Gateway>
<LocationID>
<Name>Subnet location</Name>
</LocationID>
<Description>subnet description</Description>
</SubnetID>
<VideoSettingsID>
<XResolution>1280</XResolution>
<YResolution>1024</YResolution>
<VRefresh>60</VRefresh>
<BitsPerPel>32</BitsPerPel>
</VideoSettingsID>
<SysPartSize>0</SysPartSize>
</AssetConfig>
</Items>