Shutting Down Machines
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
Answers (16)
Please log in to answer
Posted by:
bgatech
15 years ago
Posted by:
MACSnow
15 years ago
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.
http://www.kace.com/kacekonference09/agenda-detail.php?tab=3
Good Luck!
Rich
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.
http://www.kace.com/kacekonference09/agenda-detail.php?tab=3
Good Luck!
Rich
Posted by:
MACSnow
15 years ago
Here's something else that I see with the default script:
Log for 'Shutdown Windows' on 'Some Machine'
[hr]
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.
Of course they could lose open docs if they are not saved.
Best,
Rich
Log for 'Shutdown Windows' on 'Some Machine'
[hr]
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.
Best,
Rich
Posted by:
MACSnow
15 years ago
ORIGINAL: MACSnow
Of course they could lose open docs if they are not saved.
Best,
Rich
Or I could do what was suggested in the conference:
Dependencies:
psshutdown.exe
Task 1
Attempts:
On Failure: Break Continue
Verify
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...
Rich
Posted by:
brondum9
14 years ago
Posted by:
MACSnow
14 years ago
Hi,
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!
Rich
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!
Rich
Posted by:
cblake
15 years ago
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)
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)
Posted by:
GillySpy
15 years ago
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
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
Posted by:
2bexact
15 years ago
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.
Posted by:
2bexact
15 years ago
Posted by:
2bexact
15 years ago
Posted by:
bgatech
15 years ago
Posted by:
kdasanmartino
15 years ago
Posted by:
chrisgrim
15 years ago
2bexact,
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.
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.
Posted by:
2bexact
15 years ago
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
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.