David Peel | Hi There, I'm very new to UCS, and currently tpoc'ing UCSM 2.0(q); so not 100% if this is relevent to you? Here's one possible code snippet for performing this task with 0.9.8 Powertools. (least what I have been able to determine so far) Note: You must trigger the restart via UCSM; otherwise it does not know a restart has occured.......it's a "feature" of the DME/AG/MIT automagic :-) # Loop through each SP requiring acknowledgement ${lsAcks} = Get-UcsLsmaintAck -OperState "waiting-for-user" foreach (${lsAck} in ${lsAcks}) { # perform any activity on host prior to reboot here. i.e. put vmHost into maintenance mode etc.
# Acknowledge Maintenance Acknowlwedgement to progress reboot Set-UcsLsmaintAck -LsmaintAck ${lsAck} -AdminState "trigger-immediate" # Wait for UCS state change; reboot triggered ${lsAck} | Watch-Ucs -Property OperState -SuccessValue pending-next-boot -PollSec 30 -TimeoutSec 600 } Hope this helps? Dave |
| Please sign in to flag this as inappropriate. |