cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1165
Views
0
Helpful
1
Replies

UCS PowerTool - Boot Server

Kruithoff
Level 1
Level 1

Hi all,

 

i have a bit of code that will give me the powerstate from a serviceprofile. Code ist here and the Powertool is connectet to a UCS Central:

 

$ServiceProfile = Get-UcsCentralServiceProfile -Name $Servername            
        
#Abrage vom PowerState
$PowerState = Get-UcsCentralServer | where {$_.AssignedToDn -like "*$Servername*"} | select OperState -ExpandProperty OperState

if ($PowerState -eq "power-off")
{
    Write-Host "# Das ServiceProfile $ServerName ist ausgeschaltet. Es wird eingeschaltet.`r`n"
    
}
elseif ($PowerState -eq "ok")
{
    Write-Host "# Das ServiceProfile $ServerName ist eingeschaltet. Es wird ein RESET durchgeführt.`r`n"
    
}
elseif ($PowerState -eq $null)
{
    Write-Host "# Das ServiceProfile $ServerName hat kein Blade zugeordnet.`r`n"
    $NoBlade = 1
}

 

So now my question. How can i boot/reset a serviceprofile via powertool?? I can´t find anything in the doku.

 

Thanks for your help.

 

Rainer

1 Reply 1

Kirk J
Cisco Employee
Cisco Employee

Greetings.

 set-ucscentralserverpower -ServiceProfile ABDEFGNAME -State up -Force

 -State has bunch of options including:admin-down, admin-up, bmc-reset-immediate, bmc-reset-wait, cmos-reset-immediate, cycle-immediate, cycle-wait, diagnostic-interrupt, down, hard-reset-immediate, hard-reset-wait, ipmi-reset, kvm-reset, soft-shut-down, soft-shut-down-only, up

 Other parameters include -ComputeInstance, -ServerPower

Thanks,

Kirk...

Review Cisco Networking for a $25 gift card