Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Scheduled Shutdown Win2k3

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 10-08-2005
Mike
 
Posts: n/a
Scheduled Shutdown Win2k3


I'm trying to schedule a shutdown of a Windows Server 2003 Standard (SP1,
console logged in and locked). I can't seem to get it to work?

Using task scheduler gives the "0x4f7" as the result code when running:
C:\WINDOWS\system32\shutdown.exe /s /t 120 /c "Server Shutdown" /d p:0:0

Its run with correct privileges, local administrator. (workgroup
environment)

The same result code appears when running the above command in a scheduled
batch file. The server is able to successfully shutdown remote xp's. If I
run this command from the console session it works. (same applies if its in
a batch file)






Reply With Quote
  #2  
Old 10-08-2005
Torgeir Bakken \(MVP\)
 
Posts: n/a
Re: Scheduled Shutdown Win2k3

Mike wrote:

> I'm trying to schedule a shutdown of a Windows Server 2003 Standard (SP1,
> console logged in and locked). I can't seem to get it to work?
>
> Using task scheduler gives the "0x4f7" as the result code when running:
> C:\WINDOWS\system32\shutdown.exe /s /t 120 /c "Server Shutdown" /d p:0:0
>
> Its run with correct privileges, local administrator. (workgroup
> environment)
>
> The same result code appears when running the above command in a scheduled
> batch file. The server is able to successfully shutdown remote xp's. If I
> run this command from the console session it works. (same applies if its in
> a batch file)

Hi,


Add /f to make it a forced shutdown and see if it helps.


If that didn't help:

You might need to enable the remote shutdown privilege for the user
account that is defined as the task user even if you are going to only
operate on the local computer. If the task user is a member of the
local Administrators group, I think the privilege is already in place.

Take a look here for how to add remote shutdown privilege:
http://groups.google.co.uk/groups?th...TNGP09.phx.gbl

Anyway, Psshutdown.exe in SysInternals's free PSTools suite does not
suffer under this limitation and is the tool I recommend to use in
this case.

http://www.sysinternals.com

Alternatively, to avoid any 3rd party tool, you can use a VBScript
instead (I don't think it have the same issue as shutdown.exe, but I
am not 100% sure):
http://groups.google.co.uk/group/mic...b?dmode=source





--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scr...r/default.mspx
Reply With Quote
  #3  
Old 29-08-2005
Mike
 
Posts: n/a
Re: Scheduled Shutdown Win2k3

/f switch worked.

I logged the output of the batch file and the results was - workstation
locked use the force switch - something on those lines.

Thanks

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:uo6D7HbnFHA.572@TK2MSFTNGP15.phx.gbl...
> Mike wrote:
>
>> I'm trying to schedule a shutdown of a Windows Server 2003 Standard (SP1,
>> console logged in and locked). I can't seem to get it to work?
>>
>> Using task scheduler gives the "0x4f7" as the result code when running:
>> C:\WINDOWS\system32\shutdown.exe /s /t 120 /c "Server Shutdown" /d p:0:0
>>
>> Its run with correct privileges, local administrator. (workgroup
>> environment)
>>
>> The same result code appears when running the above command in a
>> scheduled batch file. The server is able to successfully shutdown remote
>> xp's. If I run this command from the console session it works. (same
>> applies if its in a batch file)

> Hi,
>
>
> Add /f to make it a forced shutdown and see if it helps.
>
>
> If that didn't help:
>
> You might need to enable the remote shutdown privilege for the user
> account that is defined as the task user even if you are going to only
> operate on the local computer. If the task user is a member of the
> local Administrators group, I think the privilege is already in place.
>
> Take a look here for how to add remote shutdown privilege:
> http://groups.google.co.uk/groups?th...TNGP09.phx.gbl
>
> Anyway, Psshutdown.exe in SysInternals's free PSTools suite does not
> suffer under this limitation and is the tool I recommend to use in
> this case.
>
> http://www.sysinternals.com
>
> Alternatively, to avoid any 3rd party tool, you can use a VBScript
> instead (I don't think it have the same issue as shutdown.exe, but I
> am not 100% sure):
> http://groups.google.co.uk/group/mic...b?dmode=source
>
>
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scr...r/default.mspx



Reply With Quote
  #4  
Old 12-01-2009
Member
 
Join Date: Jan 2009
Posts: 1
Re: Scheduled Shutdown Win2k3

you can find more info on www.nadirterzi.com/ntblog/?p=3
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Scheduled Shutdown Win2k3"
Thread Thread Starter Forum Replies Last Post
How to run Virtual Machine headless and controlling shutdown or suspend upon Mac OS X Lion Reboot or Shutdown? Chheda Windows Software 3 07-02-2012 12:03 PM
WSUS in win2k3 maverick09 Operating Systems 3 15-06-2009 08:21 AM
Mortens ShutDown to Shutdown Computer at Desired Date And Time Soumen Tips & Tweaks 1 19-03-2009 10:32 AM
SID history trouble in Win2k3 to Win2k3 migration rfgrau@eos.ncsu.edu Windows Server Help 14 16-10-2008 09:04 PM
How to setup VPN on Win2K3 SBS behind D-Link VPN router Manik Small Business Server 3 23-04-2008 01:21 AM


All times are GMT +5.5. The time now is 09:11 PM.