Quantcast
Channel: Systems Management - Wiki
Viewing all articles
Browse latest Browse all 335

PowerShell Cmdlets for PowerEdge Servers

$
0
0
Current Revision posted to Systems Management - Wiki by steven_zessin_Dell on 6/29/2017 4:44:05 PM

 

The integrated Dell Remote Access Controller (iDRAC) with Lifecycle Controller PowerShell library enables remote management of Dell PowerEdge servers with Microsoft PowerShell cmdlets.

The cmdlets utilize the remote management functionality provided by iDRAC with Lifecycle controller to perform a range of deployment, configuration, monitoring, and management tasks.

   

Features and Benefits

  • Utilize 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 later

  • 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 and must be accessible to the management workstation

What's new with version 0.51

1. Set-PEPowerState now supports the following power operations

  • PowerOn
  • PowerCycleOffSoft
  • PowerOffSoft
  • MasterBusReset
  • DiagonisticInterruptNMI
  • PowerOffSoftGraceful

2. Wait option: all cmdlets that support the –Wait option have been enhanced to both wait for the completion of the operation and to return a Job object

3. Import-PEServerConfiguration: corrected issue with -Passthru

4. Following cmdlets updated to fix issues with returning the Job object

  • Backup_PEServerImage
  • Export-PEServerConfiguration
  • Import-PEServerConfiguration
  • Export-PETechSupportReport

5. Following cmdlets updated to properly handle multi-iDRAC operations

  • Get-PEBootOrder
  • Update-PEOSAppHealthdata
  • Get-PEConfigurationShare
  • Get-PELCLog

 

 

Download

Download version 0.51 here

cmdlet to update iDRAC FW using network share

Notice: This module is provided “as-is” with no warranty or support provided. 

 

Installation Steps

  1. Download the zip file.

  2. Extract the zip file contents to a directory within the standard PSModulePath. For example, C:\Users\<User>\Documents\WindowsPowerShell\Modules

  3. Verify that the module is available by executing the following command in a PowerShell window: ‘Get-Module –ListAvailable’.

  4.  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:

 

  1. This creates a session and sets the $iDRACSession:                                                                         

    $iDRACSession = New-PEDRACSession -IPAddress 10.94.225.102 -Credential (Get-Credential)

  2. 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

  3. 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 with Lifecycle Controller. For cmdlets that involve jobs, two switches are provided; unless a switch is specified, the cmdlet will not show any status or output

–wait:  if –wait is specified, the cmdlet will display a progress bar, wait for the job to complete and return a Job object

–passthru: if -passthru is specified, the cmdlet will output the return Job object but will not wait for the job to complete. The job object must be captured into a 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

 


Viewing all articles
Browse latest Browse all 335

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>