PowerShell Cmdlets for PowerEdge Servers
Dell has provided a PowerShell cmdlet module to enable PowerEdge remote management via the iDRAC with Lifecycle Controller. These cmdlets utilize the remote management functionality provided by iDRAC with Lifecycle controller to perform various deployment, monitoring, and management tasks.
Features and Benefits
Leverage the comprehensive remote management capabilities of the iDRAC with Lifecycle controller inside the PowerShell environment.
Reduce dependence on installed tools such as RACADM and command line utilities such as winrm.
Simplify management operations by replacing large, multi-step WS-MAN tasks with a single cmdlet.
Perform iDRAC Discovery across the network with a single command.
Configure Active Directory integration for iDRAC7 and iDRAC8.
Perform deployment and configuration tasks with Server Configuration Profile (SCP) cmdlets; the SCP is a single XML-based file that can be used to configure PowerEdge server hardware.
Gather various inventory and health information including LC log info, firmware versions, boot order, hardware configuration information, and iDRAC configuration information.
Requirements
Management workstation with Microsoft PowerShell version 3 or 4
12th or 13th Generation PowerEdge servers
iDRAC7 (12th Generation PE Servers) or iDRAC8 (13th Generation PE Servers). The iDRAC must be configured for network access. It must be accessible to the management workstation
Download
Notice: This module shouldbeconsideredbetaandsubjecttochange.It is provided “as-is” with no warranty or support provided.
Installation Steps
Download the zip file.
Extract the zip file contents to a directory within the standard PSModulePath. For example, C:\Users\<User>\Documents\WindowsPowerShell\Modules
Verify that the module is available by executing the following command in a PowerShell window: ‘Get-Module –ListAvailable’.
d. To get a list of all the cmdlets in DellPEPowerShellTools, execute:
‘Get-Command –Module DellPEPowerShellTools’
General Behavior Guidelines
Authentication to a PowerEdge Server
Most cmdlets require authentication to the iDRAC. This is accomplished with a session object. The cmdlet “New-PEDRACSession” can be used to create and manage sessions to a remote server:
This creates a session and sets the $iDRACSession:
$iDRACSession = New-PEDRACSession -IPAddress 10.94.225.102 -Credential (Get-Credential)
This creates a session and adds it as a default parameter value for all other cmdlets:
New-PEDRACSession -IPAddress 10.94.225.102 -Credential (Get-Credential) –SetDefaultParameterValue
This creates a set of sessions, any cmdlet using this will run on multiple IPs:
‘IP1’, ‘IP2’, ‘IP3’ | New-PEDRACSession -Credential (Get-Credential) –SetDefaultParameterValue
Job Management
Some server-side tasks include the creation of a job within the iDRAC/LC. For cmdlets that involve jobs, two switches are provided. Without the switches specified, the cmdlet will not show any status or output
–wait: if this is specified, the cmdlet will display a progress bar and wait for the job to complete
–passthru: if this is specified, the cmdlet will output the return object but will not wait for the job to complete. The job object must be captured into variable in order to view the JOBID
Error Handling
Every cmdlet will ‘Throw’ on an error, which is catchable using ‘Catch’ in script
File Shares
Certain server-side tasks require the use of a file share to pass payloads (such as Server Configuration Profiles). For such cmdlets, the –ShareObject parameter accepts a share object which the user may create by using the Get-PEConfigurationShare. The Get-PEConfigurationShare cmdlet also has the option to validate whether or not the share is accessible to the iDRAC. If a cmdlet is running on multiple iDRACs, the FileName/ImageName parameter is modified for each invocation to include IPAddress to make it unique. Appropriate warnings will be shown.
Executing Cmdlets on Multiple Servers
For cmdlets which return HashMaps (Get-PEADGroupInfo, Get-PEiDRACUsers), if run on multiple iDRACs, the output will be a HashMap of HashMaps, having IPAddress as key.
For cmdlets which return CimInstances (Get-PEBootOrder, etc), if run on multiple iDRACs, each instance contains the iDRAC IP as identifier.
List of Available Cmdlets
Backup-PEServerImage |
Export-PEServerConfigurationProfile |
Export-PETechSupportReport |
Find-PEDRAC |
Get-PEADGroupInfo |
Get-PEBootOrder |
Get-PEConfigurationJobStatus |
Get-PEConfigurationResult |
Get-PEConfigurationShare |
Get-PEDRACPrivilege |
Get-PEDRACUser |
Get-PELCLog |
Get-PESystemInformation |
Import-PECertificate |
Import-PEServerConfigurationProfile |
New-PEDRACSession |
New-PERebootJobForSWUpdate |
Set-PEADRoleGroup |
Set-PEAutobackupSchedule |
Set-PECommonADSetting |
Set-PEDRACUser |
Set-PEPowerState |
Set-PEStandardSchemaSetting |
Update-PEOSAppHealthData |
Wait-PEConfigurationJob |