I have a need to shutdown a server as part of my automation pipeline, so I’m using an API.
I am using this XML as a body to pass to the create action API, and all I’m doing is literally shutting down:
<?xml version="1.0" encoding="utf-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SkipUI="true">
<SingleAction>
<Title>Shutdown Action</Title>
<Relevance>true</Relevance>
<ActionScript>shutdown 30</ActionScript>
<Settings>
<PostActionBehavior Behavior="Shutdown">
<AllowCancel>false</AllowCancel>
<PostActionDeadlineBehavior>RunAutomatically</PostActionDeadlineBehavior>
<PostActionDeadlineInterval>PT5M</PostActionDeadlineInterval>
</PostActionBehavior>
</Settings>
<Target>
<ComputerID>1234567</ComputerID>
</Target>
</SingleAction>
</BES>
I verify that my server does in fact shut down (so the action is completed), however, instead of the Status being set to “Completed” it is set to “Pending Restart” - is there a way to specify that a restart is not required for this action?
I also tried adding a “Shutdown” Post-Action in my XML to see if I can remove the “Pending Restart” status, but it did not do anything.