Hi Peter, 

I am very familiar with using the runas command, since I am scheduling this 
using the AT command are you saying to launch the command window using the 
runas command when scheduling the script?
( Since I am logged on as a administrator how should using runas make a 
difference?

I also checked the default local security policy, you are correct the local 
system account does not have the rights to shut down the system.   The default 
settings on a 2000 server are only the administrator, backup operator and power 
users have the rights. I'll just create a GPO and give the local system account 
the rights to shut down the system.

Thank you for pointing me in the right direction.

Jose :-)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Peter Jessop
Sent: Tuesday, May 10, 2005 10:53 AM
To: [email protected]
Subject: Re: [ActiveDir] Shutdown script not working.


A script run under the user context of the account that invokes it.
Commands invoked by the at command use the user context specified in services 
(as Alain pointed out), which is by default Local System

So if you use the at command you have two possibilities.
1) Change the 'Log on as' for the Task Scheduler to another user context
2) Add the necessary user right to Local System Account (provided you do not 
need access to another machine.)

To invoke a script under another user context you can use the runas command.

List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to