Results 1 to 4 of 4

Thread: Scheduled Shutdown Win2k3

  1. #1
    Mike Guest

    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)






  2. #2
    Torgeir Bakken \(MVP\) Guest

    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

  3. #3
    Mike Guest

    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




  4. #4
    Join Date
    Jan 2009
    Posts
    1

    Re: Scheduled Shutdown Win2k3

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

Similar Threads

  1. Replies: 3
    Last Post: 07-02-2012, 12:03 PM
  2. WSUS in win2k3
    By maverick09 in forum Operating Systems
    Replies: 3
    Last Post: 15-06-2009, 08:21 AM
  3. Replies: 1
    Last Post: 19-03-2009, 10:32 AM
  4. SID history trouble in Win2k3 to Win2k3 migration
    By rfgrau@eos.ncsu.edu in forum Windows Server Help
    Replies: 14
    Last Post: 16-10-2008, 09:04 PM
  5. How to setup VPN on Win2K3 SBS behind D-Link VPN router
    By Manik in forum Small Business Server
    Replies: 3
    Last Post: 23-04-2008, 01:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •