Release Notes

18 Automating Dell EMC PowerEdge Server Management by using iDRAC REST API with DMTF Redfish and Microsoft PowerShell
4 Detailing cmdlet code for iDRAC REST API with Redfish
Here, the Set-PowerControlRedfish cmdlet is annotated with highlighted comments for each section of the
code.
<#
# The first part of the cmdlet will always be the comment block explaining
description, examples, etc. which can get accessed when you run “Get-Help” on the
cmdlet.
_author_ = Texas Roemer <Texas_Roemer@Dell.com>
_version_ = 2.0
Copyright (c) 2017, Dell, Inc.
This software is licensed to you under the GNU General Public License,
version 2 (GPLv2). There is NO WARRANTY for this software, express or
implied, including the implied warranties of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
along with this software; if not, see
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
#>
<#
.Synopsis
Cmdlet used to get either server current power state or change the server
power state
.DESCRIPTION
Cmdlet used to get either server current power state or change the server
power state. If you are changing the server power state, make sure you pass in
the exact string value since the values are case sensitive.
Supported parameters:
- idrac_ip, pass in the iDRAC IP
- idrac_username, pass in the iDRAC user name
- idrac_password, pass in the iDRAC user name password
- power_request_value, pass in the value you want to change the server power
state to
- get_power_state_only, get the current server power state
.EXAMPLE
Set-PowerControlREDFISH -idrac_ip 192.168.0.120 -idrac_username root -idrac_
password calvin -get_power_state_only y
# Example to get current server power state
.EXAMPLE
Set-PowerControlREDFISH -idrac_ip 192.168.0.120 -idrac_username root -
idrac_password calvin -power_request_value On
# Example to power ON the server
#>