WS Access
WS Access
WS Access
3-1
Cisco UCS SMASH Reference Guide
N/A
3
Accessing and Using WS-Management
This chapter describes how to access the SMASH Web Services interface (WS-Management) and
provides limited information about its use. For detailed information about using the SMASH
WS-Management tool, see the DMTF documentation at this URL:
http://www.dmtf.org/standards/smash
This chapter contains the following topics:
Obtaining and Installing a WS-Management Client, page 3-1
Configuring WinRM, page 3-2
Viewing the Available Commands, page 3-2
Command Structure, page 3-3
Task Examples, page 3-4
Obtaining and Installing a WS-Management Client
To use WS-Management, you must obtain and install a WS-Management client for your operating
system. Free clients are available for common operating systems, including Windows, Macintosh OS X,
and Linux.
For this guide, we will use Microsoft Windows Remote Management (WinRM) as an example. WinRM
is included with current Windows desktop and server versions, and is available as a download from
Microsoft for selected earlier versions. Refer to Microsofts documentation for instructions on obtaining
and installing the appropriate version of WinRM for your client computer.
After installation, WinRM can be run from a Windows command prompt in any directory. To test the
installation, enter the winrm id command at the Windows command prompt. The command output
should appear as in the following example:
C:\> winrm id
IdentifyResponse
ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
ProductVendor = Microsoft Corporation
ProductVersion = OS: 5.1.2600 SP: 2.0 Stack: 1.1
3-2
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Configuring WinRM
Configuring WinRM
By default, WinRM has the following restrictions:
Requires a secure connection (https)
Disallows basic authentication
Trusts no host
You must configure the client to allow unencrypted communication and basic authentication, and to trust
certain hosts for unencrypted communication. To make these configuration changes, enter the following
commands at the Windows command prompt:
winrm set winrm/config/client/auth @{Basic="true"}
winrm set winrm/config/client @{AllowUnencrypted="true"}
winrm set winrm/config/client @{TrustedHosts="*"}
This example shows how to verify the configuration:
C:\> winrm get winrm/config/client
Client
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = true
Auth
Basic = true
Digest = true
Kerberos = true
Negotiate = true
Certificate = true
DefaultPorts
HTTP = 80
HTTPS = 443
TrustedHosts = *
C:\>
Viewing the Available Commands
To display the WinRM command options, enter the winrm command at the Windows command prompt,
as in the following example:
C:\>winrm
Windows Remote Management Command Line Tool
Windows Remote Management (WinRM) is the Microsoft implementation of
the WS-Management protocol which provides a secure way to communicate
with local and remote computers using web services.
Usage:
winrm OPERATION RESOURCE_URI [-SWITCH:VALUE [-SWITCH:VALUE] ...]
[@{KEY=VALUE[;KEY=VALUE]...}]
For help on a specific operation:
winrm g[et] -? Retrieving management information.
winrm s[et] -? Modifying management information.
winrm c[reate] -? Creating new instances of management resources.
winrm d[elete] -? Remove an instance of a management resource.
winrm e[numerate] -? List all instances of a management resource.
winrm i[nvoke] -? Executes a method on a management resource.
3-3
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Command Structure
winrm id[entify] -? Determines if a WS-Management implementation is
running on the remote machine.
winrm quickconfig -? Configures this machine to accept WS-Management
requests from other machines.
winrm configSDDL -? Modify an existing security descriptor for a URI.
winrm helpmsg -? Displays error message for the error code.
For help on related topics:
winrm help uris How to construct resource URIs.
winrm help aliases Abbreviations for URIs.
winrm help config Configuring WinRM client and service settings.
winrm help certmapping Configuring client certificate access.
winrm help customremoteshell Configures a shell executable and
arguments corresponding to a shell URI.
winrm help remoting How to access remote machines.
winrm help auth Providing credentials for remote access.
winrm help input Providing input to create, set, and invoke.
winrm help switches Other switches such as formatting, options, etc.
Tip The output of the winrm command lists many other help options. Explore these additional options for
detailed information about WinRM commands.
Command Structure
The following example shows a typical winrm get command:
C:\> winrm get
cimv2/CCIM_IndicatorLED?SystemCreationClassName=CCIM_ComputerSystem+SystemName=srv:1+Creat
ionClassName=CCIM_IndicatorLED+DeviceID=LED_FPID -r:https://192.0.20.137:443 -a:Basic
-u:admin -p:password -encoding:utf-8 -f:text -skipCAcheck -skipCNcheck
The following table describes the fields of this command:
Field Description
winrm
The main winrm command.
get
This command is a GET CIM Object instance
WSMAN operation, which retrieves management
information.
cimv2/
The cimv2 path is an alias to the full resource URI
that we are trying to retrieve. In this case, it is an
alias for a DMTF CIM schema. For more
information, enter the winrm help aliases
command.
CCIM_IndicatorLED?
This is the object whose properties are being
queried.
SystemCreationClassName=CCIM_ComputerSystem
The first of four object identification keys.
+
The + operator links multiple instances of
key=value pairs.
SystemName=srv:1
The second of four object identification keys.
CreationClassName=CCIM_IndicatorLED
The third of four object identification keys.
DeviceID=LED_FPID
The last of four object identification keys.
3-4
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples
Task Examples
This section contains the following examples:
Configuring a Battery Sensor Threshold, page 3-4
Configuring a Chassis Locator LED, page 3-8
Viewing and Clearing the System Event Log, page 3-11
Performing a Power Control Operation, page 3-13
Configuring a Battery Sensor Threshold
This example reads the 3 volt battery sensor status, sets the LowerThresholdCritical property to a new
value of 2000, and reads the sensor again to verify the new value (in this example, the value is shown in
bold for readability):
C:\> winrm get
cimv2/CCIM_NumericSensor?CreationClassName=CCIM_NumericSensor+DeviceID=0.0.20.1+SystemName
=srv:1+SystemCreationClassName=CCIM_ComputerSystem -r:https://192.0.20.137 -a:Basic
-u:admin -p:password -encoding:utf-8 -f:text -skipCNcheck -skipCAcheck
CCIM_NumericSensor
Accuracy = null
AccuracyUnits = null
AdditionalAvailability = null
Availability = null
-r:https://192.0.20.137:443
The resource URI. Specifies an HTTP secure
connection to the server at the given IP address at
port 443. For more information, enter the winrm
help remoting command.
-a:Basic
Basic authentication will be used for the server
connection. For more information, enter the
winrm help auth command.
-u:admin
The username for logging in with basic
authentication.
-p:password
The password for logging in with basic
authentication.
-encoding:utf-8
Data exchanged with the server will be in UTF-8
enconding. For more information on this field and
the remaining fields, enter the winrm help
switches command.
-f:text
The format of data exchanged with the server will
be formatted as text.
-skipCAcheck
The SSL certificate authority (CA) of the server
need not be a trusted root authority.
-skipCNcheck
The SSL common name (CN) of the server need
not match the hostname of the server.
Field Description
3-5
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples
AvailableRequestedStates = null
BaseUnits = 5
Caption = null
CommunicationStatus = null
CreationClassName = CCIM_NumericSensor
CurrentReading = 30096
CurrentState = Normal
Description = null
DetailedStatus = null
DeviceID = 0.0.20.1
ElementName = P3V_BAT_SCALED(0.0.20)
EnabledDefault = 2
EnabledState = 1
EnabledThresholds = null
ErrorCleared = null
ErrorDescription = null
HealthState = 5
Hysteresis = null
IdentifyingDescriptions = null
InstallDate = null
IsLinear = null
LastErrorCode = null
LocationIndicator = null
LowerThresholdCritical = 21780
LowerThresholdFatal = 19932
LowerThresholdNonCritical = 0
MaxQuiesceTime = null
MaxReadable = null
MinReadable = null
Name = null
NominalReading = null
NormalMax = null
NormalMin = null
OperatingStatus = null
OperationalStatus = 2
OtherEnabledState = null
OtherIdentifyingInfo = null
OtherSensorTypeDescription = null
PollingInterval = null
PossibleStates = Normal, Upper Fatal, Upper Critical, Upper Non-Critical, Lower Fatal,
Lower Critical, Lower Non-Critical, Unknown
PowerManagementCapabilities = null
PowerManagementSupported = null
PowerOnHours = null
PrimaryStatus = 1
ProgrammaticAccuracy = null
RateUnits = 0
RequestedState = 12
Resolution = null
SensorType = 3
SettableThresholds = 2, 3, 4
Status = null
StatusDescriptions = null
StatusInfo = null
SupportedThresholds = 2, 3, 4
SystemCreationClassName = CCIM_ComputerSystem
SystemName = srv:1
TimeOfLastStateChange = null
Tolerance = null
TotalPowerOnHours = null
TransitioningToState = 12
UnitModifier = -4
UpperThresholdCritical = 33000
UpperThresholdFatal = 0
3-6
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples
UpperThresholdNonCritical = 0
ValueFormulation = 2
C:\> winrm set
cimv2/CCIM_NumericSensor?CreationClassName=CCIM_NumericSensor+DeviceID=0.0.20.1+SystemName
=srv:1+SystemCreationClassName=CCIM_ComputerSystem -r:https://192.0.20.137 -a:Basic
-u:admin -p:password -encoding:utf-8 -f:text -skipCNcheck -skipCAcheck
@{LowerThresholdCritical="2000"}
CCIM_NumericSensor
Accuracy = null
AccuracyUnits = null
AdditionalAvailability = null
Availability = null
AvailableRequestedStates = null
BaseUnits = 5
Caption = null
CommunicationStatus = null
CreationClassName = CCIM_NumericSensor
CurrentReading = 30096
CurrentState = Normal
Description = null
DetailedStatus = null
DeviceID = 0.0.20.1
ElementName = P3V_BAT_SCALED(0.0.20)
EnabledDefault = 2
EnabledState = 1
EnabledThresholds = null
ErrorCleared = null
ErrorDescription = null
HealthState = 5
Hysteresis = null
IdentifyingDescriptions = null
InstallDate = null
IsLinear = null
LastErrorCode = null
LocationIndicator = null
LowerThresholdCritical = 2000
LowerThresholdFatal = 19932
LowerThresholdNonCritical = 0
MaxQuiesceTime = null
MaxReadable = null
MinReadable = null
Name = null
NominalReading = null
NormalMax = null
NormalMin = null
OperatingStatus = null
OperationalStatus = 2
OtherEnabledState = null
OtherIdentifyingInfo = null
OtherSensorTypeDescription = null
PollingInterval = null
PossibleStates = Normal, Upper Fatal, Upper Critical, Upper Non-Critical, Lower Fatal,
Lower Critical, Lower Non-Critical, Unknown
PowerManagementCapabilities = null
PowerManagementSupported = null
PowerOnHours = null
PrimaryStatus = 1
ProgrammaticAccuracy = null
RateUnits = 0
RequestedState = 12
Resolution = null
SensorType = 3
3-7
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples
SettableThresholds = 2, 3, 4
Status = null
StatusDescriptions = null
StatusInfo = null
SupportedThresholds = 2, 3, 4
SystemCreationClassName = CCIM_ComputerSystem
SystemName = srv:1
TimeOfLastStateChange = null
Tolerance = null
TotalPowerOnHours = null
TransitioningToState = 12
UnitModifier = -4
UpperThresholdCritical = 33000
UpperThresholdFatal = 0
UpperThresholdNonCritical = 0
ValueFormulation = 2
C:\> winrm get
cimv2/CCIM_NumericSensor?CreationClassName=CCIM_NumericSensor+DeviceID=0.0.20.1+SystemName
=srv:1+SystemCreationClassName=CCIM_ComputerSystem -r:https://192.0.20.137 -a:Basic
-u:admin -p:password -encoding:utf-8 -f:text -skipCNcheck -skipCAcheck
CCIM_NumericSensor
Accuracy = null
AccuracyUnits = null
AdditionalAvailability = null
Availability = null
AvailableRequestedStates = null
BaseUnits = 5
Caption = null
CommunicationStatus = null
CreationClassName = CCIM_NumericSensor
CurrentReading = 30096
CurrentState = Normal
Description = null
DetailedStatus = null
DeviceID = 0.0.20.1
ElementName = P3V_BAT_SCALED(0.0.20)
EnabledDefault = 2
EnabledState = 1
EnabledThresholds = null
ErrorCleared = null
ErrorDescription = null
HealthState = 5
Hysteresis = null
IdentifyingDescriptions = null
InstallDate = null
IsLinear = null
LastErrorCode = null
LocationIndicator = null
LowerThresholdCritical = 1980
LowerThresholdFatal = 19932
LowerThresholdNonCritical = 0
MaxQuiesceTime = null
MaxReadable = null
MinReadable = null
Name = null
NominalReading = null
NormalMax = null
NormalMin = null
OperatingStatus = null
OperationalStatus = 2
OtherEnabledState = null
OtherIdentifyingInfo = null
3-8
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples
OtherSensorTypeDescription = null
PollingInterval = null
PossibleStates = Normal, Upper Fatal, Upper Critical, Upper Non-Critical, Lower Fatal,
Lower Critical, Lower Non-Critical, Unknown
PowerManagementCapabilities = null
PowerManagementSupported = null
PowerOnHours = null
PrimaryStatus = 1
ProgrammaticAccuracy = null
RateUnits = 0
RequestedState = 12
Resolution = null
SensorType = 3
SettableThresholds = 2, 3, 4
Status = null
StatusDescriptions = null
StatusInfo = null
SupportedThresholds = 2, 3, 4
SystemCreationClassName = CCIM_ComputerSystem
SystemName = srv:1
TimeOfLastStateChange = null
Tolerance = null
TotalPowerOnHours = null
TransitioningToState = 12
UnitModifier = -4
UpperThresholdCritical = 33000
UpperThresholdFatal = 0
UpperThresholdNonCritical = 0
ValueFormulation = 2
Note Because some properties have limited resolution, the actual resulting value may be slightly different
from the value specified in the set command, as in this example.
Configuring a Chassis Locator LED
This example reads the current status of the chassis locator LED, turns the LED on by changing the
Activation State from 4 to 3, and verifies the new status:
C:\> winrm get
cimv2/CCIM_IndicatorLED?SystemCreationClassName=CCIM_ComputerSystem+SystemName=srv:1+Creat
ionClassName=CCIM_IndicatorLED+DeviceID=LED_FPID -r:https://192.0.20.137:443 -a:Basic
-u:admin -p:password -encoding:utf-8 -f:text -skipCAcheck -skipCNcheck
CCIM_IndicatorLED
ActivationState = 4
AdditionalAvailability = null
Availability = null
AvailableRequestedStates = null
Caption = null
Color = 6
CommunicationStatus = null
ControlMode = 3
ControlPattern = null
CreationClassName = CCIM_IndicatorLED
DefaultActivationState = 4
Description = null
DetailedStatus = null
DeviceID = LED_FPID
ElementName = Chassis Identify LED
3-9
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples
EnabledDefault = 2
EnabledState = 5
ErrorCleared = null
ErrorDescription = null
HealthState = null
IdentifyingDescriptions = null
IndicatedConditions = 3
InstallDate = null
LastErrorCode = null
LocationIndicator = null
MaxQuiesceTime = null
Name = null
OperatingStatus = null
OperationalStatus = null
OtherColorDescription = null
OtherEnabledState = null
OtherIdentifyingInfo = null
OtherIndicatedConditionDescription = null
PowerManagementCapabilities = null
PowerManagementSupported = null
PowerOnHours = null
PrimaryStatus = null
RequestedState = 12
Status = null
StatusDescriptions = null
StatusInfo = null
SystemCreationClassName = CCIM_ComputerSystem
SystemName = srv:1
TimeOfLastStateChange = null
TotalPowerOnHours = null
TransitioningToState = 12
C:\> winrm set
cimv2/CCIM_IndicatorLED?SystemCreationClassName=CCIM_ComputerSystem+SystemName=srv:1+Creat
ionClassName=CCIM_IndicatorLED+DeviceID=LED_FPID -r:https://192.0.20.137:443 -a:Basic
-u:admin -p:password -encoding:utf-8 -f:text -skipCAcheck -skipCNcheck
@{ActivationState="3"}
CCIM_IndicatorLED
ActivationState = 3
AdditionalAvailability = null
Availability = null
AvailableRequestedStates = null
Caption = null
Color = 6
CommunicationStatus = null
ControlMode = 3
ControlPattern = null
CreationClassName = CCIM_IndicatorLED
DefaultActivationState = 4
Description = null
DetailedStatus = null
DeviceID = LED_FPID
ElementName = Chassis Identify LED
EnabledDefault = 2
EnabledState = 5
ErrorCleared = null
ErrorDescription = null
HealthState = null
IdentifyingDescriptions = null
IndicatedConditions = 3
InstallDate = null
LastErrorCode = null
LocationIndicator = null
3-10
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples
MaxQuiesceTime = null
Name = null
OperatingStatus = null
OperationalStatus = null
OtherColorDescription = null
OtherEnabledState = null
OtherIdentifyingInfo = null
OtherIndicatedConditionDescription = null
PowerManagementCapabilities = null
PowerManagementSupported = null
PowerOnHours = null
PrimaryStatus = null
RequestedState = 12
Status = null
StatusDescriptions = null
StatusInfo = null
SystemCreationClassName = CCIM_ComputerSystem
SystemName = srv:1
TimeOfLastStateChange = null
TotalPowerOnHours = null
TransitioningToState = 12
C:\> winrm get
cimv2/CCIM_IndicatorLED?SystemCreationClassName=CCIM_ComputerSystem+SystemName=srv:1+Creat
ionClassName=CCIM_IndicatorLED+DeviceID=LED_FPID -r:https://192.0.20.137:443 -a:Basic
-u:admin -p:password -encoding:utf-8 -f:text -skipCAcheck -skipCNcheck
CCIM_IndicatorLED
ActivationState = 3
AdditionalAvailability = null
Availability = null
AvailableRequestedStates = null
Caption = null
Color = 6
CommunicationStatus = null
ControlMode = 3
ControlPattern = null
CreationClassName = CCIM_IndicatorLED
DefaultActivationState = 4
Description = null
DetailedStatus = null
DeviceID = LED_FPID
ElementName = Chassis Identify LED
EnabledDefault = 2
EnabledState = 5
ErrorCleared = null
ErrorDescription = null
HealthState = null
IdentifyingDescriptions = null
IndicatedConditions = 3
InstallDate = null
LastErrorCode = null
LocationIndicator = null
MaxQuiesceTime = null
Name = null
OperatingStatus = null
OperationalStatus = null
OtherColorDescription = null
OtherEnabledState = null
OtherIdentifyingInfo = null
OtherIndicatedConditionDescription = null
PowerManagementCapabilities = null
PowerManagementSupported = null
PowerOnHours = null
3-11
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples
PrimaryStatus = null
RequestedState = 12
Status = null
StatusDescriptions = null
StatusInfo = null
SystemCreationClassName = CCIM_ComputerSystem
SystemName = srv:1
TimeOfLastStateChange = null
TotalPowerOnHours = null
TransitioningToState = 12
Viewing and Clearing the System Event Log
This example reads the system event log (SEL) entries, reads the log details, clears the log, and reads the
log details again:
C:\> winrm Enumerate cimv2/CCIM_SELLogEntry -r:https://192.0.20.137:443 -a:Basic -u:admin
-p:password -encoding:utf-8 -f:text -skipCAcheck -skipCNcheck
CCIM_SELLogEntry
Caption = null
CreationTimeStamp = 20100607145556.000000+000
Description = null
ElementName = System Event Log Entry
InstanceID = CCIM:SEL:Entry:1
Locale = null
LogInstanceID = CCIM:SEL:1
LogName = System Event Log
Message = null
MessageArguments = null
MessageID = null
OwningEntity = null
RecordData = *1*LED_FPID: Platform sensor, OFF event was asserted
RecordFormat = *string Severity*string Description
RecordID = 1
CCIM_SELLogEntry
Caption = null
CreationTimeStamp = 20100607145600.000000+000
Description = null
ElementName = System Event Log Entry
InstanceID = CCIM:SEL:Entry:2
Locale = null
LogInstanceID = CCIM:SEL:1
LogName = System Event Log
Message = null
MessageArguments = null
MessageID = null
OwningEntity = null
RecordData = *1*LED_FPID: Platform sensor, FAST BLINK event was asserted
RecordFormat = *string Severity*string Description
RecordID = 2
C:\> winrm get
"http://schemas.cisco.com/wbem/wscim/1/cim-schema/2/CCIM_SELRecordLog?InstanceID=CCIM:SEL:
1" -r:https://192.0.20.137:443 -a:Basic -u:admin -p:password -encoding:utf-8 -f:text
-skipCAcheck -skipCNcheck
CCIM_SELRecordLog
AvailableRequestedStates = null
Caption = null
3-12
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples
CommunicationStatus = null
CurrentNumberOfRecords = 2
Description = null
DetailedStatus = null
ElementName = System Event Log
EnabledDefault = 2
EnabledState = 2
HealthState = 5
InstallDate = null
InstanceID = CCIM:SEL:1
LogState = 2
MaxNumberOfRecords = 3008
Name = null
OperatingStatus = null
OperationalStatus = 2
OtherEnabledState = null
OverwritePolicy = 7
PrimaryStatus = null
RequestedState = 12
Status = null
StatusDescriptions = null
TimeOfLastStateChange = null
TransitioningToState = 12
C:\> winrm invoke ClearLog
"http://schemas.cisco.com/wbem/wscim/1/cim-schema/2/CCIM_SELRecordLog?InstanceID=CCIM:SEL:
1" -r:https://192.0.20.137:443 -a:Basic -u:admin -p:password -encoding:utf-8 -f:text
-skipCAcheck -skipCNcheck
ClearLog_OUTPUT
ReturnValue = 0
C:\> winrm get
"http://schemas.cisco.com/wbem/wscim/1/cim-schema/2/CCIM_SELRecordLog?InstanceID=CCIM:SEL:
1" -r:https://192.0.20.137:443 -a:Basic -u:admin -p:password -encoding:utf-8 -f:text
-skipCAcheck -skipCNcheck
CCIM_SELRecordLog
AvailableRequestedStates = null
Caption = null
CommunicationStatus = null
CurrentNumberOfRecords = 0
Description = null
DetailedStatus = null
ElementName = System Event Log
EnabledDefault = 2
EnabledState = 2
HealthState = 5
InstallDate = null
InstanceID = CCIM:SEL:1
LogState = 2
MaxNumberOfRecords = 3008
Name = null
OperatingStatus = null
OperationalStatus = 2
OtherEnabledState = null
OverwritePolicy = 7
PrimaryStatus = null
RequestedState = 12
Status = null
StatusDescriptions = null
TimeOfLastStateChange = null
TransitioningToState = 12
3-13
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples
Performing a Power Control Operation
This example queries the system power management capabilities with a WinRM enumerate command,
displays an XML file containing the desired power control changes, and invokes the changes by applying
the XML file with a WinRM invoke command:
C:\> winrm enumerate cimv2/CCIM_CSPowerManagementCapabilities -r:https://192.0.20.137:443
-a:Basic -u:admin -p:password -encoding:utf-8 -f:text -skipCAcheck -skipCNcheck
CCIM_CSPowerManagementCapabilities
Caption = null
Description = null
ElementName = Power Management Capabilities
InstanceID = CCIM:pwrmgtcap1
OtherPowerCapabilitiesDescriptions = null
OtherPowerChangeCapabilities = null
PowerCapabilities = null
PowerChangeCapabilities = 3, 4, 7, 8
PowerStatesSupported = 2, 5, 8, 10, 11, 12
C:\> type pwrcntrl_req.xml
<p:RequestPowerStateChange_INPUT
xmlns:p='http://schemas.cisco.com/wbem/wscim/1/cim-schema/2/CCIM_CSPowerManagementService'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">
<p:ManagedElement>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
<wsa:ReferenceParameters>
<wsman:ResourceURI>http://schemas.cisco.com/wbem/wscim/1/cim-schema/2/CCIM_ComputerSystem<
/wsman:ResourceURI>
<wsman:SelectorSet>
<wsman:Selector Name="Name">srv:1</wsman:Selector>
<wsman:Selector Name="CreationClassName">CCIM_ComputerSystem</wsman:Selector>
</wsman:SelectorSet>
</wsa:ReferenceParameters>
</p:ManagedElement>
<p:PowerState>5</p:PowerState>
<p:Time>00000000000000.000000:000</p:Time>
<p:TimeoutPeriod>00000000000000.000000:000</p:TimeoutPeriod>
</p:RequestPowerStateChange_INPUT>
C:\> winrm invoke RequestPowerStateChange
"cimv2/CCIM_CSPowerManagementService?CreationClassName=CCIM_CSPowerManagementService+Name=
pwrmgtsvc:1+SystemName=CIMC:1+SystemCreationClassName=CCIM_SPComputerSystem"
-r:https://192.0.20.137:443 -a:Basic -u:admin -p:password -encoding:utf-8 -f:pretty
-skipCAcheck -skipCNcheck -file:pwrcntrl_req.xml
<n1:RequestPowerStateChange_OUTPUT
xmlns:n1="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CCIM_CSPowerManagementService"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<n1:Job xsi:nil="true"></n1:Job>
<n1:ReturnValue>2</n1:ReturnValue>
</n1:RequestPowerStateChange_OUTPUT>
3-14
Cisco UCS SMASH Reference Guide
N/A
Chapter 3 Accessing and Using WS-Management
Task Examples