Log In
Developer Network
Technologies
Join the Network
Member Services
Events & Community
Unified Computing UCS Manager Developer Center
Overview
UCS Manager XML Schema
UCS Automation Tool (goUCS)
Server and Host Management API
UCS Standalone C-Series Servers
Cisco Standalone C-Series CIMC XML API
goUCS Automation Tool
Cisco Standalone C-Series HUU Utilities
Documentation
Community
Testing
UCS Management Ecosystem
Management with HP Software
HP Operations Manager (HPOM)
HP Operations Orchestration (HPOO)
Management with Microsoft Software
Microsoft System Center
Cisco UCS PowerTool for UCSM
SDK
System Management Resources
Altiris
UCS Management with VMware Software
OpenStack
UCS Labs
Labs Wiki
VM-FEX
Overview
Getting Started
Resources
Flexpod
Overview
Getting Started
Resources
Everything
This Site
Blogs
Cisco UCS for RackTables
Jeffrey Silberman
25 Oct 2012
Cisco UCS PowerTool Examples
Eric Williams
20 Jul 2012
ANNOUNCEMENT: goUCS version 2.0 Released
Eric Williams
08 Mar 2012
Getting to Know your UCS Fabric Interconnect Neighbors
John McDonough
10 Nov 2011
SCOM MP version 2.0 for Cisco UCS is now available
Chakri Avala
01 Sep 2011
Showing 1 - 5 of 16 results.
Items per Page 5
Page
(Changing the value of this field will reload the page.)
1
2
3
4
of 4
First
Previous
Next
Last
Forums
Message Boards Home
Recent Posts
Statistics
Answer
(
Unmark
)
Mark as an Answer
« Back to Microsoft Discussions
RE: New Message from James Shen in Unified Computing UCS Manager - Microsof
Threads [
Previous
|
Next
]
James Shen
Posts:
1
Join Date:
11/10/10
Recent Posts
How to Gracefully shutdown all servers in a chassis
Answer
5/16/12 10:39 PM
Mark as an Answer
Submit
Reply with Quote
Quick Reply
What would be the most efficient way to do this ?
The output of "ConvertTo-UcsCmdlet" generated the following for the blade in 1/8
Get-UcsOrg -Level root | Get-UcsOrg -Name "ESX" -LimitScope | Get-UcsServiceProfile -Name "ESX-1-8" -LimitScope | Get-UcsServerPower | Set-UcsServerPower -State "soft-shut-down"
I would imagine this should be something like this with pipelining :
Get-UcsBlade -Chassis 1 | Get-UcsServiceProfile | SetUcsServerPower -State "soft-shut-down"
Thanks
James S
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Bhaskar Jayakrishnan
Posts:
18
Join Date:
6/30/11
Recent Posts
RE: New Message from James Shen in Unified Computing UCS Manager - Microsof
Answer
5/17/12 3:39 AM as a reply to James Shen.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
James,
The snippet generated by ConvertTo-UcsCmdlet is the most relevant sequence to issue soft-shut-down to an associated service profile.
What exactly is the operation you are trying to do ?
Get-UcsBlade -Chassis 1 | Get-UcsServiceProfile | SetUcsServerPower -State "soft-shut-down"
does not map to MIT/MO model well.
Thanks,
- bhaskar
From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Thursday, May 17, 2012 3:09 AM
To: cdicuser@developer.cisco.com
Subject: New Message from James Shen in Unified Computing UCS Manager - Microsoft Discussions: How to Gracefully shutdown all servers in a chassis
James Shen has created a new message in the forum "Microsoft Discussions":
--------------------------------------------------------------
What would be the most efficient way to do this ?
The output of "ConvertTo-UcsCmdlet" generated the following for the blade in 1/8
Get-UcsOrg -Level root | Get-UcsOrg -Name "ESX" -LimitScope | Get-UcsServiceProfile -Name "ESX-1-8" -LimitScope | Get-UcsServerPower | Set-UcsServerPower -State "soft-shut-down"
I would imagine this should be something like this with pipelining :
Get-UcsBlade -Chassis 1 | Get-UcsServiceProfile | SetUcsServerPower -State "soft-shut-down"
Thanks
James S
--
To respond to this post, please click the following link:
<http://developer.cisco.com/web/unifiedcomputing/forums/-/message_boards/view_message/5744686>
or simply reply to this email.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Tsu-Sheng Tsao
Posts:
7
Join Date:
8/26/10
Recent Posts
RE: How to Gracefully shutdown all servers in a chassis
Answer
5/17/12 7:45 AM as a reply to James Shen.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
James,
This is what I use, you can try it.
########################################################################
# Import the Cisco UCS PowerTool module
Import-Module CiscoUcsPS
# Connect to a UCS system
$passwd = ConvertTo-SecureString "password" -AsPlainText -Force
$ucsmcreds = New-Object System.Management.Automation.PSCredential ("admin", $passwd)
$handle = Connect-Ucs 192.168.1.1 -Credential $ucsmcreds
# Send command
# Excludes service profile which is not associated to any server
# If power is already down, no need to shutdown again
Get-UcsBlade | % { If (($_.AssignedToDn -ne "") -and ($_.OperPower -ne "off")) {
Write-Host "Shutting down" + "["$_.AssignedToDn"]..."
Get-UcsServiceProfile -Dn $_.AssignedToDn | Set-UcsServerPower -State "soft-shut-down" -Force
Write-Host
}
}
Write-Host "All done."
Disconnect-Ucs
########################################################################
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Tsu-Sheng Tsao
Posts:
7
Join Date:
8/26/10
Recent Posts
RE: How to Gracefully shutdown all servers in a chassis
Answer
5/17/12 7:56 AM as a reply to Tsu-Sheng Tsao.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Forgot to mention, that will shutdown servers in all chassis.
Replace
"Get-UcsBlade"
with
"Get-UcsBlade -Chassis 1"
then you can shutdown all servers in that chassis
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Collateral
No files available