/bundles/itninjaweb/img/Breadcrumb_cap_w.png
I have been running into some trouble with offline reboots targeting laptops. The goal is for an example: "reboot Saturday morning at 6 am regardless if the device is connected to our k1000 or not. Now if you miss this reboot window (ex: device was asleep or hibernating), then reboot asap after the device is powered on."

I seem to not be able to force this kind of reboot at all with kace. I already know the script will work with an online script or via CMD, so it cant be the syntax of the commands. Just doesn't seems to pop as an offline script. Any ideas? xml of the script below

<?xml version="1.0" encoding="utf-8" ?>
<kbots xmlns="http://kace.com/Kbots.xsd">
<kbot>

<config name="!TEST- Reboot@ testing" type="job" id="1129" version="1516297757" description="testing reboot issues ">

<execute disconnected="true" logged_off="true">
</execute>

</config>

<compliance>

<verify on_failure="break" attempts="1">

<file_exists path="C:\Windows\System32" file="shutdown.exe" />

<on_verify_success>
<launch_program path="%WINDIR%\System32" program="shutdown.exe" wait="false" parms="/r /f /c &quot;Your device will reboot in 2 minutes to complete Microsoft updates. Please save your work now.&quot; /t 120" />
<log_message type="status" message="DOS reboot command excuted on system via kace" />
</on_verify_success>

<on_verify_failure>
<log_message type="status" message="[ERROR] DOS reboot command unavailable." />

<on_remediation_success>
</on_remediation_success>

<on_remediation_failure>
</on_remediation_failure>

</on_verify_failure>

</verify>

</compliance>

</kbot>
</kbots>
1 Comment   [ - ] Hide Comment

Comments

  • What are your schedule settings?
    • I want to be able to set it on a Monday for the weekend when the reboots are needed. Not really on a schedule.
      But let's say I set it for "16 of February at 21:00"
      *allow run while disconnected
      *allow run without a logged-in user
      (I tried before with "run on next check-in", I dont think it worked. I also know now that this won't work until the device is live on the internal network and can talk to kace)
Please log in to comment

Answer this question or Comment on this question for clarity

Answers

0
Your script worked perfectly in my environment. I copy/pasted the XML, set a scheduled time, targeted a computer, and forced a check-in on that device. At the designated time, the notification displayed and two minutes later the computer restarted. I tested with the computer both connected and disconnected from the internet.

What are your settings in Settings > Provisioning > Communication Settings under "Scripting Update"?
Answered 03/02/2018 by: JasonEgg
Red Belt

  • 2 hours. I will set up a test today on my laptop
Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share