10/22/2009 7251 views
I've just install kbox and I'm using the default shutdown script the clients are not respoding to it. They are in the inventory. Any suggestions?
0 Comments   [ + ] Show comments


Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

All Answers

The Shutdown commands send by KBOX scripting are the built in Windows commands (I'm assuming you're using Windows?). If you're having trouble check the KBOX logs as well as the event logs for clues. If your machines are in keyboard lock mode you'll need to add the "-f" switch to force the shutdown.

Other options include:
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d u

No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)
Answered 10/23/2009 by: cblake
Red Belt

The machines are in inventory is good but more importantly:

1. Are the machines connected (ie. green light shown in inventory)
2. are you using an online script. i can't remember if the built-in script is online (i.e. kbox scheduled while connected) or offline (ie. lient scheduled)
3. is the kbox busy with other tasks in progress? settings->support->troubleshooting tools -> tasks
Answered 10/25/2009 by: GillySpy
7th Degree Black Belt

The machines are connected. I can see the kace management software running in processes. I have altered the script in a couple ways but nothing happens. The machines are assigned to two groups/ labels. I tried targeting the machine by IP and the group(s) by name. Still nothing. I've used both online/offline in the script. No other task are active other then weekly email alerts.
Answered 10/26/2009 by: 2bexact
Senior Yellow Belt

I am awaiting Board Approval for this project and this is of urgent interest.
Answered 10/27/2009 by: 2bexact
Senior Yellow Belt

All machines being tested are.....

windows XP sp2/3
joined to domain
Has multiple user profiles.
Has wake on land capabilities but don't wake either.
Answered 10/28/2009 by: 2bexact
Senior Yellow Belt

The old build in shutdown script used to be for 10 seconds. We had to up it to 90 so that the kbox would know it ran. I also have it set as an online script. That way it only runs the script at the given time.

Check the scripting logs for one of the machines it is suppose to run on.
Answered 10/28/2009 by: bgatech
Orange Senior Belt

I had to add shutdown.exe as a dependency before I could get it to work.
Not sure if you have that in your scrip or not.
Answered 10/30/2009 by: kdasanmartino
Second Degree Green Belt


It seems like maybe the scripts aren't running at all. Let's take a step back. If you look at the scripting logs for one of the target machines in inventory, does it show a log for your shutdown script? Another good way to test is to go to the Run Now tab under Scripting, choose the script and one or more machines and you will get immediate feedback and a log. If you post that log, maybe we can help a bit more.
Answered 10/31/2009 by: chrisgrim
Senior Purple Belt

Its now 9.23am. The log has the script as still running for what I'm seeing here. This is under ther the run now status

Start Time: Nov 02 2009 08:44:22 AM
Script Name: Shutdown a Windows system
Total Machines: 1

Pushed Machines: 1 (100%)
Push Successes: 1 (100%)
Push Failures: 0 (0%)

Completed Machines: 0 (0%)
Running Machines: 1 (100%)

Successes: 0 (0%)
Failures: 0 (0%)

When i click on scripts running, it shows the machine with a ? mark
Answered 11/02/2009 by: 2bexact
Senior Yellow Belt

just tried shutdown.exe in the script. same result
Answered 11/02/2009 by: 2bexact
Senior Yellow Belt

I assume that the machine you are testing is near by. Did you up the shutdown time from 10 to 90 seconds. 10 seconds is not enough time to respond that the script ran. I would also try running the command line on the machine and see if it shuts down without the kbox.
Answered 11/02/2009 by: bgatech
Orange Senior Belt

This is something I use a lot, but it sounds like you're in a situation where you may not have tested any scripts before on remote machines... Is that right? It could be that your credentials are not set up (worth a call to support to check that out!)

Another interesting point to note: at the user conference this week we were discussing power management, and there was a suggestion to use psshutdown (free download from MS) to get additional capability. It has more features than the standard Windows utility.

You might find the video or slides of that session on the Kace website.

Good Luck!
Answered 11/14/2009 by: MACSnow
Senior Yellow Belt

Here's something else that I see with the default script:

Log for 'Shutdown Windows' on 'Some Machine'


Started: Nov 14 2009 07:38:27 PM
Finished: Nov 14 2009 07:38:27 PM
Elapsed Time: 0 seconds
Status: in state 'verification_success'

Output LogC:\WINDOWS\System32\cmd.exe
standard output:
The machine is locked and can not be shut down without the force option.

C:\WINDOWS\System32\cmd.exe: process exited with code: 0

So in this case I have to change the script to force shutdown.

Edit:C:\WINDOWS\System32\cmd.exe /C shutdown -s -c "Shutdown by KBOX" -t 90 -d U:00:00
To add -f
C:\WINDOWS\System32\cmd.exe /C shutdown -f -s -c "Shutdown by KBOX" -t 90 -d U:00:00

Of course they could lose open docs if they are not saved.


Answered 11/14/2009 by: MACSnow
Senior Yellow Belt


Of course they could lose open docs if they are not saved.



Or I could do what was suggested in the conference:


Task 1
On Failure: Break Continue
On Success
Launch “$(KACE_DEPENDENCY_DIR)\psshutdown.exe”
with params “-c -f -m ”Shutdown by MountAuburn Administrator, click to cancel...“ -t 90 -e p:00:00”.
Log “PSSHUTDOWN Command Issued Successfully.” to “status”.

Hope this helps.
Seems to allow the user to cancel the forced shutdown...

Answered 11/14/2009 by: MACSnow
Senior Yellow Belt

Pstools would have to be on the workstation for psshutdown to work? YEs? It isnt on the xp machine by default.
Answered 12/02/2009 by: brondum9
Senior Yellow Belt


Well actually no, pstools does not have to be placed on the machine in advance.
By specifying the dependency - psshutdown.exe - the script will load it onto the PC.
Then as you see in the script, where it says: "Launch “$(KACE_DEPENDENCY_DIR)\psshutdown.exe” "
The token $(KACE_DEPENDENCY_DIR) specifies the folder on the machine where the psshutdown.exe
binary is placed.

So when you run the script, it will place the file on the PC for you and then run it.

Hope that helps!

Answered 12/02/2009 by: MACSnow
Senior Yellow Belt