Using OpenManage Essentials Command Line Interface. Dell V1.2, OpenManage Essentials v1.2

Add to My manuals
223 Pages

advertisement

Using OpenManage Essentials Command Line Interface. Dell V1.2, OpenManage Essentials v1.2 | Manualzz

Using OpenManage Essentials Command Line

Interface

27

Launching the OpenManage Essentials Command Line Interface

Click Start → All Programs → OpenManage Applications → Essentials → Essentials Command Line Interface.

Creating a Discovery Profile Input File

CLI commands that create discovery ranges or discovery groups require an XML-based file that defines the parameters for discovery protocols such as SNMP, WMI, Storage, WS-Man, SSH, and IPMI. This file defines which protocols are used and the parameters for each of the protocols. The file can be modified using an XML editor or a text editor. A sample XML file (DiscoveryProfile.xml) is included in thesamples folder at C:\Program Files (x86)\Dell\SysMgt\Essentials

\Tools\CLI\Samples. Edit the xml file and rename it to create multiple discovery profiles. You cannot store passwords for

WMI, IPMI, WS-Man, EMC and SSH protocols in the XML file. Specify passwords in the command line arguments using the following commands:

• -wmiPassword<wmi password>

• -ipmiPassword<ipmi password>

• -wsmanPassword<wsman password>

• -emcPassword<emc password>

• -sshPassword<ssh password>

An example of the profile.xml file is outlined below:

<?xml version="1.0" encoding="utf-8" ?>

<DiscoveryConfiguration>

<NetMask>

255.255.255.240

</NetMask>

<ICMPConfiguration>

<Timeout>400</Timeout>

<Retries>1</Retries>

</ICMPConfiguration>

<SNMPConfig Enable="True">

<GetCommunity>public</GetCommunity>

<SetCommunity></SetCommunity>

<Timeout>400</Timeout>

<Retries>2</Retries>

</SNMPConfig>

<WMIConfig Enable="False">

<UserName>Administrator</UserName>

</WMIConfig>

<StoragePowerVaultConfig Enable="False"></StoragePowerVaultConfig>

<StorageEMCConfig Enable="False">

<UserName>Administrator</UserName>

<Port>443</Port>

</StorageEMCConfig>

<WSManConfig Enable="False">

215

<Userid></Userid>

<Timeout>2</Timeout>

<Retries>4</Retries>

<Port>623</Port>

<SecureMode Enable="False" SkipNameCheck="False" TrustedSite="False">

<CertificateFile>Certificate.crt</CertificateFile>

</SecureMode>

</WSManConfig>

<IPMIConfig Enable="False">

<UserName></UserName>

<KGkey></KGkey>

<Timeout>5</Timeout>

<Retries>2</Retries>

</IPMIConfig>

<SSHConfig Enabled="True">

<UserName>Administrator</UserName>

<Timeout>5</Timeout>

<Retries>2</Retries>

<Port>400</Port>

</SSHConfig>

</DiscoveryConfiguration>

NOTE: If you discovered iDRAC using WS-Man and if you are using secure mode where a certificate file is required to be on the local system, specify the entire path to the certificate file. For example, c:\192.168.1.5.cer.

Specifying IPs, Ranges, or Host names Using XML or CSV Files

You must specify ranges during discovery, inventory, and status tasks. A range in this instance is defined either as an individual IP address, a host name, or an actual range of IPs such as 192.168.7.1-50 or 10.35.0.*. Add ranges, IPs, or host names either to an xml or csv-based input file and then read the file by specifying it on the command line using the –

RangeList or –RangeListCSV argument. A sample XML file (RangeList.xml) and CSV file (RangeList.csv) are included in the samples folder at C:\Program Files (x86)\Dell\SysMgt\Essentials\Tools\CLI\Samples. To create multiple input files, edit and rename either the xml or csv file.

NOTE: If you are creating discovery range groups, then each group can only have one corresponding subnet. The subnet for a group is read from the DiscoveryProfile.xml file and not from the RangeList.xml or RangeList.csv file. If required, you can create multiple groups for each subnet.

An example of theRangeList.xml file is outlined as follows:

<?xml version="1.0" encoding="utf-8" ?>

<DiscoveryConfigurationRanges>

<Range Name="10.35.0.*"/>

<Range Name="10.36.1.238"/>

<Range Name="PE2850-WebServer1A"/>

</DiscoveryConfigurationRanges>

An example of the RangeList.csv is outlined as follows:

Name

192.168.10.*

192.168.10.1-255

SubnetMask

255.255.255.0

255.255.255.0

192.168.1-2.*

10.35.*.1-2

192.168.2.1

255.255.255.0

255.255.255.0

255.255.224.0

216

Name

192.168.2.2

192.168.3.3

192.168.3.4

SubnetMask

255.255.254.0

255.255.128.0

255.255.128.0

Specifying Input Files in PowerShell

To use input files in PowerShell, specify the location of the file in the command line. By default, OpenManage Essentials

CLI starts at the following directory:

PS C:\Program Files (x86)\Dell\SysMgt\Essentials\Tools\CLI>

If you are running commands from the default CLI directory, with commands located in the directory one level from it

(\samples), you can use either of the following methods of specifying the path to the input files:

• Type the entire path name in quotes. For example, Add-DiscoveryRange –Profile “C:\Program

Files (x86)\Dell\SysMgt\Essentials\Tools\CLI\Samples\DiscoveryProfile.xml” .

• Use a period (.) to retrieve the file located in the current directory, or .\directory to retrieve the file located one level from the current directory. For example, Add-DiscoveryRange –Profile .\samples

\DiscoveryProfile.xml

.

Command Line Interface Commands

Access to CLI commands in the OpenManage Essentials is dependent on your access privilege. If your user id belongs to the OMEAdministrators group, you can access all the CLI commands. If your user id belongs to the OMEUsers group, then you cannot delete or modify any data using the CLI and a warning message is displayed.

Creating a Discovery Range

Description: The Add-DiscoveryRange command allows you to create a new discovery range. The command references an xml file (DiscoveryProfile.xml) which is a protocol definition associated with the discovery range. Enter the ranges either using an xml file, csv file, or by specifying the range. For more information about DiscoveryProfile.xml,

RangeList.xml, and RangeList.csv files, see Creating a Discovery Profile Input File

and

Specifying IPs, Ranges, or Host

Names Using XML or CSV Files

.

Commands:

• PS> Add-DiscoveryRange –Profile <DiscoveryProfile.xml> -Range <range>

• PS> Add-DiscoveryRange –Profile <DiscoveryProfile.xml> -RangeList

<RangeList.xml>

• PS> Add-DiscoveryRange –Profile <DiscoveryProfile.xml> -RangeListCSV

<RangeList.csv>

Examples:

• PS> Add-DiscoveryRange –Profile .\Samples\DiscoveryProfile.xml -Range

10.35.0.124

• PS> Add-DiscoveryRange –Profile .\Samples\DiscoveryProfile.xml -

RangeList .\Samples\RangeList.xml

• PS> Add-DiscoveryRange –Profile .\Samples\DiscoveryProfile.xml -

RangeListCSV .\Samples\RangeList.csv

217

Removing a Discovery Range

Description: The Remove-DiscoveryRange command allows you to remove a discovery range. Enter the ranges

either using an xml file or by specifying the range. For more information about the RangeList.xml file, see Specifying IPs,

Ranges, or Host Names Using XML or CSV Files .

Commands:

• PS> Remove-DiscoveryRange -Range <range>

• PS> Remove-DiscoveryRange -RangeList <rangelist.xml>

Examples:

• PS> Remove-DiscoveryRange-Range 10.35.0.1, 10.120.1.2

• PS> Remove-DiscoveryRange -RangeList .\Samples\RangeList.xml

Creating a Discovery Range Group

Description: The Add-DiscoveryRangeGroup command allows you to create a discovery range group. A discovery range group can either contain a range of IPs, individual IPs, or host names under it. This enables you to modify protocols settings for the group and all the ranges it contains. You can maintain different sets of protocols for different types of devices in your network. With ranges not in a group, you have to edit each range individually to change the protocols which are active, the time out or retry values, or credentials used with each protocol. Each discovery range group can only have one corresponding subnet. The subnet for a group is read from the DiscoveryProfile.xml file and not from the Rangelist.xml or RangeList.csv file. If required, create multiple groups for each subnet. For more

information about DiscoveryProfile.xml, Rangelist.xml, and RangeList.csv files, see Creating a Discovery Profile Input File

and Specifying IPs, Ranges, or Host names Using XML or CSV Files .

Command:

• PS> Add-DiscoveryRangeGroup –Profile <DiscoveryProfile.xml> -GroupName

<group name> -RangeList <Rangelist.xml>

• PS> Add-DiscoveryRangeGroup –Profile <DiscoveryProfile.xml> -GroupName

<group name> -RangeListCSV <Rangelist.csv>

Examples:

• PS> Add-DiscoveryRangeGroup –Profile .\Samples\DiscoveryProfile.xml -

GroupName Group1 -RangeList .\Samples\rangelist.xml

• PS> Add-DiscoveryRangeGroup –Profile .\Samples\DiscoveryProfile.xml -

GroupName Group1 -RangeListCSV .\Samples\rangelist.csv

Removing a Discovery Range Group

Description: The Remove-DiscoveryRangeGroup command allows to you to remove a discovery range group.

Command:

PS>Remove-DiscoveryRangeGroup -GroupName <groupname>

Example:

PS>Remove-DiscoveryRangeGroup -GroupName Group1

Editing a Discovery Range

Description: The Set-ModifyDiscoveryRange command allows to edit existing discovery ranges. This command targets the existing specified discovery range(s) and replaces the protocol information with the information specified in

218

the DiscoveryProfile.xml file. For more information about the DiscoveryProfile.xml and RangeList.xml files, see Creating a

Discovery Profile Input File and

Specifying IPs, Ranges, or Host names Using XML or CSV Files .

Commands:

• PS> Set-ModifyDiscoveryRange –Profile <DiscoveryProfile.xml> -Range

<range>

• PS> Set-ModifyDiscoveryRange –Profile <DiscoveryProfile.xml> -RangeList

<RangeList.xml>

Examples:

• PS>Set-ModifyDiscoveryRange –Profile .\Samples\DiscoveryProfile.xml -

Range 10.35.1.23

• PS> Set-ModifyDiscoveryRange –Profile .\Samples\DiscoveryProfile.xml -

RangeList .\Samples\RangeList.xml

Editing a Discovery Range Group

Description: The Set-ModifyDiscoveryRangeGroup command allows you to edit an existing discovery range group. You can change the protocols for the discovery range group by specifying a DiscoveryProfile.xml file which changes the current protocol settings for the specified group. For information about the DiscoveryProfile.xml file, see

Creating a Discovery Profile Input File

.

Command:

PS> Set-ModifyDiscoveryRangeGroup -GroupName <groupname> –Profile

<DiscoveryProfile.xml> -AddRangeList <rangelist .xml or .csv file>

Example:

• Change a discovery range group’s discovery profile and add new ranges to the discovery range group using a .xml file:

PS> Set-ModifyDiscoveryRangeGroup -GroupName WebServers-TX -Profile .

\samples\snmp_only.xml -AddRangeList .\samples\new_ranges.xml

• Change a discovery range group’s discovery profile and add new ranges to the discovery range group using a .csv file:

PS> Set-ModifyDiscoveryRangeGroup -GroupName WebServers-TX -Profile .

\samples\snmp_only.xml -AddRangeListCSV .\samples\new_ranges.csv

• Add new ranges to a discovery range group using a .xml file (retaining the previously discovered profile):

PS> Set-ModifyDiscoveryRangeGroup -GroupName WebServers-TX -AddRangeList .

\samples\new_ranges.xml

• Add new ranges to a discovery range group using .csv (retaining the previously discovered profile):

PS> Set-ModifyDiscoveryRangeGroup -GroupName WebServers-TX -

AddRangeListCSV .\samples\new_ranges.csv

Enabling a Discovery Range or Discovery Range Group

Description: The Set-EnableDiscoveryRange command allows you to enable a discovery range or a discovery range group. Enter the ranges either using an xml file or by specifying the range. For information about the RangeList.xml file, see

Specifying IPs, Ranges, or Host names Using XML or CSV Files .

Commands:

• PS> Set-EnableDiscoveryRange -Range <range>

• PS> Set-EnableDiscoveryRange -RangeList <RangeList.xml>

219

• PS> Set-EnableDiscoveryRangeGroup -GroupName <groupname>

Examples:

• PS> Set-EnableDiscoveryRange -Range 10.35.1.3, 10.2.3.1

• PS> Set-EnableDiscoveryRange -RangeList .\Samples\RangeList.xml

• PS> Set-EnableDiscoveryRangeGroup -GroupName Group1

Disabling a Discovery Range or Discovery Range Group

Description: The Set-DisableDiscoveryRange command allows you to disable a discovery range or a discovery range group. Enter the ranges either using an xml file or by specifying the range. For information about the RangeList.xml file, see

Specifying IPs, Ranges, or Host names Using XML or CSV Files .

Commands:

• PS> Set-DisableDiscoveryRange -Range <range>

• PS> Set-DisableDiscoveryRange -RangeList <RangeList.xml>

• PS> Set-DisableDiscoveryRangeGroup -GroupName <groupname>

Examples:

• PS> Set-DisableDiscoveryRange -Range 10.35.1.3

• PS> Set-DisableDiscoveryRange -RangeList .\Samples\RangeList.xml

• PS> Set-DisableDiscoveryRangeGroup -GroupName Group1

Creating a Discovery Exclude Range

Description: The Add-DiscoveryExcludeRange command allows you to add an exclude range. Enter the ranges

either using an xml file or by specifying the range. For information about the RangeList.xml file, see Specifying IPs,

Ranges, or Host Names Using XML or CSV Files .

Commands:

• PS> Add-DiscoveryExcludeRange -Range <range>

• PS> Add-DiscoveryExcludeRange -RangeList <RangeList.xml>

Examples:

• PS> Add-DiscoveryExcludeRange -Range 10.35.12.1

• PS> Add-DiscoveryExcludeRange -RangeList .\Samples\RangeList.xml

Removing a Discovery Exclude Range

Description: The Remove-DiscoveryExcludeRange command allows you to remove an exclude range. Enter the ranges either using an xml file or by specifying the range. For information about the RangeList.xml file, see

Specifying

IPs, Ranges, or Host Names Using XML or CSV Files .

Commands:

• PS> Remove-DiscoveryExcludeRange -Range <range>

• PS> Remove-DiscoveryExcludeRange -RangeList <RangeList.xml>

Examples:

220

• PS> Remove-DiscoveryExcludeRange -Range 10.35.12.1

• PS> Remove-DiscoveryExcludeRange -RangeList .\Samples\RangeList.xml

Running Discovery, Inventory, and Status Polling Tasks

Description: The Set-RunDiscovery , Set-RunInventory , Set-RunDiscoveryInventory , and Set-

RunStatusPoll commands allows you to perform discovery, inventory, and status polling on a discovery range, discovery range group, or devices. For range and range groups, enter the ranges either using an xml file or by specifying

the range. For more information about the RangeList.xml file, see Specifying IPs, Ranges, or Host Names Using XML or

CSV Files

. For devices, enter the name of the device as displayed in the device tree. Multiple device names must be separated by a comma.

Commands:

• PS> Set-RunDiscovery -DeviceName <device 1>,<device 2>,...,<device N>

• PS> Set-RunDiscovery -Range <rangename>

• PS> Set-RunDiscovery -GroupName <rangeGroupName>

• PS> Set-RunDiscovery -RangeList <rangelist.xml>

• PS> Set-RunInventory -DeviceName <device 1>,<device 2>,...,<device N>

• PS> Set-RunInventory -Range <rangename>

• PS> Set-RunInventory -GroupName <rangeGroupName>

• PS> Set-RunInventory -RangeList <rangelist.xml>

• PS> Set-RunDiscoveryInventory -DeviceName <device 1>,<device

2>,...,<device N>

• PS> Set-RunDiscoveryInventory -Range <rangename>

• PS> Set-RunDiscoveryInventory -GroupName <rangeGroupName>

• PS> Set-RunDiscoveryInventory -RangeList <rangelist.xml>

• Set-RunStatusPoll -DeviceName <device 1>,<device 2>,...,<device N>

• PS> Set-RunStatusPoll -Range <rangename>

• PS> Set-RunStatusPoll -GroupName <rangeGroupName>

• PS> Set-RunStatusPoll -RangeList <rangelist.xml>

Examples:

• PS> Set-RunDiscovery -Range 10.23.23.1

• PS> Set-RunInventory -GroupName MyServers

• PS> Set-RunDiscoveryInventory -RangeList .\Samples\RangeList.xml

• PS> Set-RunStatusPoll -DeviceName MyZen

Removing a Device

Description: The Remove-Device command allows you to remove devices from the device tree.

Command:

• PS> Remove-Device -DeviceName <device 1>,<device 2>,...,<device N>

Example:

• PS> Remove-Device -DeviceName Server1,RAC1

221

Retrieving the Status Execution Progress of a Discovery Range

Description: The Get-DiscoveryStatus command allows you to get the progress of a discovery range. Enter the ranges either using an xml file or by specifying the range. For information about the RangeList.xml file, see

Specifying

IPs, Ranges, or Host Names Using XML or CSV Files .

Commands:

• PS> Get-DiscoveryStatus —Range <rangeName>

• PS> Get-Discovery -RangeList <RangeList.xml>

• PS> Get-Discovery -GroupName <group name>

Examples:

• PS> Get-DiscoveryStatus —Range 10.35.2.1

• PS> Get-Discovery -RangeList .\Samples\RangeList.xml

• PS> Get-Discovery -GroupName Group1

Stopping a Running Discovery Range or Group

Description: For any range, only one type of task, such as discovery, discovery and inventory, or status polling, can run at a given time. The Set-StopTask command allows you to stop a task associated with a discovery range or the tasks associated with the ranges belonging to a discovery range group.

Commands:

• PS> Set-StopTask -Range <rangename>

• PS> Set-StopTask -GroupName <groupname>

Examples:

• PS> Set-StopTask -Range 10.35.1.12

• PS> Set-StopTask -GroupName Group1

Creating a Custom Device Group

Description: The Add-CustomGroup command allows you to create a custom device group in the device tree. If required, you can add devices to the group after it is created.

NOTE: Using OpenManage Essentials CLI, you can only create static groups which contain a finite list of servers.

You can create dynamic groups based on queries using the OpenManage Essentials console. For more

information, see Creating a New Group

.

Commands:

• PS> Add-CustomGroup –GroupName <groupName>

• PS> Add-CustomGroup –GroupName <groupName> –DeviceList <DeviceList.xml>

• PS> Add-CustomGroup –GroupName <groupName> -Devices <comma separated list of devices>

Examples:

• PS> Add-CustomGroup –GroupName MyServers –DeviceList .\Samples

\devicelist.xml

222

• PS> Add-CustomGroup –GroupName MyServers –Devices PE2900-WK28-ZMD, PWR-

CODE.US.DELL.COM, HYPERVISOR, M80504-W2K8

Example of a DeviceList.xml file:

<DeviceList>

<Device Name="PE2900-WK28-ZMD"/>

<Device Name="PWR-CODE.US.DELL.COM"/>

<Device Name="HYPERVISOR"/>

<Device Name="M80504-W2K8"/>

</DeviceList>

Adding Devices to a Custom Group

Description: The Add-DevicesToCustomGroup command allows you to add devices to an existing group. To add the devices to the group, either use an xml file or list the devices and separate them using a comma.

Commands:

• PS> Add-DevicesToCustomGroup –GroupName <groupName> -DeviceList

<devicelist.xml>

• PS> Add-DevicesToCustomGroup –GroupName <groupName> -Devices <comma separated list of devices>

Examples:

PS> Add-DevicesToCustomGroup –GroupName MyServers –DeviceList .\Samples

\DeviceList.xml

or

PS> Add-DevicesToCustomGroup –GroupName MyServers –Devices PE2900-WK28-ZMD, PWR-

CODE.US.DELL.COM, HYPERVISOR, M80504-W2K8

Example of a DeviceList.xml file:

<DeviceList>

<Device Name="PE2900-WK28-ZMD"/>

<Device Name="PWR-CODE.US.DELL.COM"/>

<Device Name="HYPERVISOR"/>

<Device Name="M80504-W2K8"/>

</DeviceList>

Deleting a Group

Description: The Remove-CustomGroup command allows you to remove a group from the root node.

Command:

PS> Remove-CustomGroup –GroupName <groupName>

Example:

PS> Remove-CustomGroup –GroupName MyServers

223

advertisement

Related manuals

advertisement

Table of contents