cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
253
Views
0
Helpful
1
Replies
Highlighted
Beginner

UCS PowerTool - Boot Server

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

Everyone's tags (1)
1 REPLY 1
Cisco Employee

Re: UCS PowerTool - Boot Server

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

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards