Advantages of Command Line Interface in Dell EMC OpenManage Essentials This Dell EMC technical white paper describes the command line interface (CLI) of OpenManage Essentials (OME). Abstract This Dell EMC technical white paper describes the command line interface (CLI) of OpenManage Essentials (OME).
Revisions Date Description August 2017 Initial release November 2018 OpenManage Essentials 2.5 release Acknowledgements This paper was produced by the following members of the Dell EMC server engineering team: Author: Anuj Verma Support: Sheshadri Rao (InfoDev) Other: The information in this publication is provided “as is.” Dell Inc.
Contents Revisions.............................................................................................................................................................................2 Acknowledgements .............................................................................................................................................................2 1 Overview....................................................................................................................................
Overview 1 Overview Many customers choose to use OpenManage Essentials (OME) without the Graphical User Interface (GUI). OME provides a CLI (Command Line Interface) that enables you to define and manipulate discovery range information, to create custom groups, add and remove devices from custom groups, and initiate discovery and inventory. Note that the CLI functionality is a subset of the OME console functionality.
2 PowerShell Extension The OME CLI infrastructure is an extension to the PowerShell command shell. Windows PowerShell is an interactive prompt and scripting environment that can be used independently, or in combination, and is used by a system administrator. Unlike most shells, which accept and return text, Windows PowerShell is built on top of the .NET Framework Common Language Runtime (CLR) and the .NET Framework and accepts and returns .NET Framework objects.
PowerShell Extension user1 SHA1 AES 4 2 443
PowerShell Extension 2.4 Protocol credentials If protocols are enabled that require credentials (WMI, IPMI, WSMan, REST, and EMC) for security reasons, the password cannot be stored in the XML file. If the user enables protocols in profile.xml that require credentials, the password will be prompted by the CLI. Optional Flags • • • • • • • 2.
PowerShell Extension CLI Access Point 2.8 View CLI Help of OpenManage Essentials There is built-in help for each of the OME CLI commands. To get syntax related information, enter: help This entry provides short syntax information of the command. At the end, details about getting more detailed information is provided. See the screen shot.
Discovery and inventory commands 3 Discovery and inventory commands The following functionality is provided by the PowerShell command line interface: • • • • • • • • • • • • • • • • • • • Create a discovery range Remove a discovery range Create a discovery range group Remove a discovery range group Enable discovery range / discovery range group Disable discovery range / discovery range group Create a discovery exclude range Remove a discovery exclude range Run a discovery range – discovery only (also per
Discovery and inventory commands 3.3 Input parameters • • • is a protocol definition associated with the discovery range. The OME discovery profile template defines the entire variable set that can be entered by using the UI discovery configuration wizard. OME installs a sample discovery protocol profile file that is located in C:\Program Files\Dell\SysMgmt\Essentials\Tools\CLI\ and it is named DiscoveryProfile.xml.
Discovery and inventory commands Removing Discovery Range 3.5 Create discovery range group • PS> Add-DiscoveryRangeGroup –Profile -GroupName RangeList
Discovery and inventory commands Removing Discovery Range Group 3.7 Enable discovery range or discovery range group The enabling or disabling a discovery range, or range group, relates to the software being able to discover and/or inventory it. An enabled group can be discovered and inventoried manually, as well automatically, by the discovery scheduler. A disabled discovery range/ range group cannot be discovered or inventoried.
Discovery and inventory commands Disabling discovery range group 3.9 Create discovery exclude range • • PS> Add-DiscoveryExcludeRange –Range PS> Add-DiscoveryExcludeRange –RangeList Input Parameters • • An exclude range name A list of exclude ranges names in an XML file Ouput • • A message indicating the operation was successful For each range that could not be added, an explanation is returned: o Exclude Range exists already Adding discovery exclude range 3.
Discovery and inventory commands Removing discovery exclude range 3.11 Run a discovery range or group: discovery, inventory, discovery & inventory, or status polling • • • • PS> Set-RunDiscovery –Range | –RangeGroup < rangeGroupName> | -RangeList PS> Set-RunInventory –Range | –RangeGroup < rangeGroupName> | -RangeList PS> Set-RunDiscoveryInventory –Range | –RangeGroup < rangeGroupName> | -RangeList
Discovery and inventory commands Input Parameters • • • The name of the range to execute as shown in the OME discovery portal a list of the ranges to get status for The discovery range group name to get execution status for Output • • Progress information for each range is returned.
Device group management 4 Device group management The CLI for device group management supports the following functionality: • • • • • 4.1 Create a custom device group hierarchy [static only] Add devices to a custom group Remove devices from a custom group List device membership in a given custom group Delete group (hierarchical) Device list details Some of the commands requires you to provide a list of devices to create/add to, or remove from a device group.
Device group management Adding custom group Added group in console 4.3 Add devices to a custom group • PS> Add-DevicesToCustomGroup –Group -DeviceList | -Devices Input Parameters: • • Group name A list of devices that will comprise membership of the group Note: If the device is not currently discovered and available in the device table in the database, the device name will be ignored.
Device group management 4.4 Remove devices from custom group • PS> Remove-DevicesFromCustomGroup –Group -DeviceList | -Devices Input Parameters • • Group Name to remove devices from A list of devices to remove Output • Success, or Note: If any of the devices specified in the device list are not members of the group, the devices are ignored and a warning message is displayed. • A failure message Removing devices from custom group 4.
Device group management 4.
Known issues 5 Known issues Issue: Optional flags for passing passwords from command line are not working. Solution: Do not pass the flag for password(s). If the selected protocol(s) require(s) password, it will be prompted.
A Technical support and resources Dell.com/support is focused on meeting customer needs with proven services and support. Storage Solutions Technical Documents on Dell TechCenter provide expertise that helps to ensure customer success on Dell EMC Storage platforms.