17.5 ioutils importasset (Importing asset information)
Functionality
This command imports asset information using a CSV file.
This command can import the following asset information:
-
Hardware asset information
-
Software license information
-
Managed software information
-
Contract information
-
Contract vendor list
For details about asset items and the CSV file description format, see the JP1/IT Desktop Management 2 Overview and System Design Guide.
When a CSV file is imported, asset information is updated with the values set in the CSV file. However, items whose values are empty (meaning, no values are enclosed in double quotation marks) in the CSV file will not be updated after importing (that is, hardware asset information is not overwritten with a null value).
- Tip
-
If a single-byte space enclosed in double quotation marks (") is specified for a value, the value is processed depending on the condition, as follows:
-
If the item is Department or Location, the value is updated to Unknown.
-
If the data type of the item is Text, the value is updated to a blank.
-
If the data type of the item is Enumeration or Hierarchy, the value is not updated.
-
When the CSV file contains an invalid value, the corresponding item does not get updated. If you specify the -detaildisplay option as an argument, information regarding the invalid value is printed on the standard output.
Execute this command on the management server.
Format
ioutils importasset -import import-file-name [ -assettype asset-information-type] -template template-name [ -encoding character-encoding] [ -prefix prefix] [ -detaildisplay]
Arguments
- -import import-file-name
-
Specify the absolute path (within 259 bytes) of the CSV file to import.
- -assettype asset-information-type
-
Specify the type of asset information to be imported. The available types of asset information are provided below. If you omit this argument, hardware (hardware asset information) is specified.
- hardware
-
Hardware asset information
- license
-
Software license information
- mngsoftware
-
Managed software information
- contract
-
Contract information
- vendor
-
Contract vendor list
- -template template-name
-
Specify a template to use for importing.
Only the items specified in the template will be imported.
If the specified items in the template do not exist in the import file, importing is performed as follows:
-
Non-existent items are treated as omitted, and the values at the time of omission will be set for the asset information when importing is finished. The omitted items are not overwritten when importing overwrites the asset information.
-
If a column associated with a mapping key does not exist, an error occurs and importing fails.
-
- -encoding character-encoding
-
Specify a character encoding for the assert information to import. The following types of character codes can be specified. When you do not specify this argument, the character code is set to UTF-8.
-
US-ASCII
-
ISO-8859-1
-
UTF-8
-
UTF-8N
-
UTF-16
-
UTF-16LE
-
UTF-16BE
-
MS932
-
Shift-JIS
-
EUC-JP
-
JIS
-
- -prefix prefix
-
Specify a prefix to be assigned to the values of the following asset items:
-
Asset numbers corresponding to hardware asset information
-
License numbers corresponding to software license information
-
Contract numbers corresponding to contract information
The specified prefix is assigned to the values of the above asset items.
- Tip
-
If you specify the prefix, you can import the numbers so that they are not duplicated when you import asset information from other systems.
Specify a string of no more than eight ASCII characters except control characters as a prefix. When data with the prefix exceeds the maximum length of data allowed (32 characters), the data items in the corresponding row of the CSV file will not be imported.
When this argument is specified for importing asset information other than hardware assets, software licenses, and contracts, the argument is ignored.
-
- -detaildisplay
-
Specify this argument when you want the following messages to be additionally printed to the standard output. For details about what cause these messages to be output, see the JP1/IT Desktop Management 2 Messages. When this argument is specified, the dots that are usually displayed to show the progress of processing do not show up in the window.
-
Detection of invalid values in the imported data (KDEX4476-W)
-
Row numbers corresponding to the error rows (rows that cannot be added or updated) (KDEX4477-W)
-
Storage location
JP1/IT Desktop Management 2-installation-folder\mgr\bin\
You can execute this command without specifying the storage location for the executable file, by using the command prompt provided by JP1/IT Desktop Management 2.
Notes
-
Execute this command when the management server setup is completed and the management server is running.
-
This command cannot be simultaneously executed by multiple users.
-
This command cannot be executed simultaneously with any of the following commands:
-
exportdb
-
importdb
-
ioassetsfieldutil export
-
ioassetsfieldutil import
-
ioutils exportasset
-
ioutils exportassetassoc
-
ioutils exportdevice
-
ioutils exportdevicedetail
-
ioutils exportfield
-
ioutils exportfilter
-
ioutils exportoplog
-
ioutils exportpolicy
-
ioutils exporttemplate
-
ioutils exportupdategroup
-
ioutils exportupdatelist
-
ioutils importassetassoc
-
ioutils importexlog
-
ioutils importfield
-
ioutils importfilter
-
ioutils importpolicy
-
ioutils importtemplate
-
ioutils importupdategroup
-
ioutils importupdatelist
-
reorgdb
-
startservice
-
stopservice
-
updatesupportinfo
-
deletenwgroup
-
deletepackage
-
distributelicense
-
Return value
The following table shows the return values of the ioutils importasset command.
Return values |
Description |
---|---|
0 |
The command finished normally. |
11 |
The format for specifying the command arguments is invalid. |
12 |
The specified folder is invalid, the disk does not have sufficient capacity, or the folder does not exist. |
31 |
Another command is being executed. |
51 |
You do not have the permissions to execute this command. |
54 |
The management server has not been set up. |
72 |
The specified template does not exist. |
80 |
The format of the file being imported is invalid. |
101 |
Command execution failed because there is not enough memory, or due to some other reason. |
120 |
A database access error occurred. |
150 |
The command execution was interrupted due to some other error. |
Example
The following example shows use of this command to import the hardware asset information file hardwareexpo.csv, which was exported to C:\temp\, using a template specified for importing hardware asset information.
ioutils importasset -import C:\temp\hardwareexpo.csv -template for hardware asset information import-encoding UTF-8
Related Topics: