Registered member login:
Register Now
Altirigos » Deployment Solution » Scripting/Tools/Docs » Power control scrpt

» Current Poll
Do you leave the Aclient enabled?
YES - 83.06%
103 Votes
NO - 16.94%
21 Votes
Total Votes: 124
You may not vote on this poll.
» Stats
Members: 9,466
Threads: 11,733
Posts: 55,229
Top Poster: Nick (4,981)
Welcome our newest member, alex_wilson@symantec.com
» Online Users: 22
0 members and 22 guests
No Members online
Most users online at once 294, 06-30-2007 at 12:24 PM.
» March 2010
S M T W T F S
28 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 123
Reply
Old 02-18-2009, 11:14 PM   #1 (permalink)
 
Status: Altiris Admin
Join Date: 05-11-2007
Location: Perth, Western Australia
Posts: 95


Power control scrpt

Does anyone have a script that shuts down computers only if they are powered on? A client is trying this and is finding that when a shut down job is aimed at a PC that is powered off that job will run as soon as the device powers up. Not good!

I had a go using a run script job to ping the device but that returned a success code even though the machine was switched off.

TIA

Mark
markr1963 is offline   Reply With Quote
Old 02-19-2009, 08:39 AM   #2 (permalink)
 
Status: Altiris Admin
Join Date: 04-25-2007
Location: Indianapolis, IN
Posts: 64


This may help:

http://www.altirigos.com/vbulletin/k...ly-turned.html
snapdad is offline   Reply With Quote
Old 02-19-2009, 08:26 PM   #3 (permalink)
 
Status: Altiris Admin
Join Date: 05-11-2007
Location: Perth, Western Australia
Posts: 95


Yes, it will.

Many thanks.
markr1963 is offline   Reply With Quote
Old 03-18-2009, 01:17 PM   #4 (permalink)
 
Status: Junior Altiris Admin
Join Date: 03-16-2009
Location: Sunny Florida
Posts: 7


it works however if the computer is shut off the job wont reschedule itself to run the next day like i want. Any ideas on how to fix this?
nlptc is offline   Reply With Quote
Old 03-18-2009, 06:38 PM   #5 (permalink)
 
Status: Super Altiris Admin
Join Date: 11-09-2006
Location: London
Posts: 718


Quote:
Originally Posted by nlptc View Post
it works however if the computer is shut off the job wont reschedule itself to run the next day like i want. Any ideas on how to fix this?
Create a job to run daily that uses the "axsched" command to run the job on the Group you want to run on.
andykn is offline   Reply With Quote
Old 03-18-2009, 07:57 PM   #6 (permalink)
 
Status: Junior Altiris Admin
Join Date: 03-16-2009
Location: Sunny Florida
Posts: 7


sorry i am not familar with that how would i do that?
nlptc is offline   Reply With Quote
Old 03-23-2009, 01:52 PM   #7 (permalink)
 
Status: Junior Altiris Admin
Join Date: 03-16-2009
Location: Sunny Florida
Posts: 7


?
nlptc is offline   Reply With Quote
Old 03-23-2009, 02:31 PM   #8 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,363


Use the agents available with Task Server to accomplish this. Just be sure to roll out the power control agent first.
Attached Images
File Type: jpg powercontrolagent.JPG (55.3 KB, 48 views)
__________________
Brandon

Last edited by Brandon; 03-23-2009 at 02:50 PM..
Brandon is offline   Reply With Quote
Old 03-23-2009, 04:11 PM   #9 (permalink)
 
Status: Super Altiris Admin
Join Date: 11-09-2006
Location: London
Posts: 718


Quote:
Originally Posted by nlptc View Post
sorry i am not familar with that how would i do that?
You need to look up the syntax of the axsched command in the DS manual Appendix.

The create a new Job, Run Script Task, Run on Deployment Server, command line something like

axsched groupname jobname time

use 00/00/00 00:00 for immediate and schedule the task.
andykn is offline   Reply With Quote
Old 03-30-2009, 11:13 AM   #10 (permalink)
 
PWenham's Avatar
 
Status: Junior Altiris Admin
Join Date: 01-14-2009
Location: UK
Posts: 21


I have just created a power management solution VB Script as I too had the same problems as you did.

My shutdown script checks the local time of the PC, if it is within 10 mins of the specified time, it will shut it down. If not, it assumes the PC was off at the time and so the task fails. It also only shuts down if the PC has no one logged in (windows PC at CTRL ALT DEL) as I didnt want to be responsible for loss of data.

I will have to check with my employer if I can post it or not as they have paid me to develop it, what I can say is that you need two functions, one to check the time and one to see who is logged on. If both return true, run a cmdline shutdown.
PWenham is offline   Reply With Quote
Old 04-04-2009, 02:46 PM   #11 (permalink)
 
Status: Altiris Admin
Join Date: 03-29-2009
Location: Wisconsin
Posts: 41


Quote:
Originally Posted by snapdad View Post
This may help:
That does work, but oddly it still powers on the machine if it is off..but the job errors out like it should. Weird.
Petrucci914 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 12:19 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos