Results 1 to 3 of 3

Thread: Server will not shutdown or log off

  1. #1
    Glenn Hayes Guest

    Server will not shutdown or log off

    W2k3 R2 sp2 will not respond to a log off or shutdown command. Nothing
    unusual logged in the event log. Removed APC UPS software to eliminate that
    possiblity. Can't seem to find anything that is not right but it is slow to
    respond and no response on shutdown, restart or logoff. Server is a Dell 2850
    Dual proc server.
    --
    Glenn Hayes

  2. #2
    Paul Bergson [MVP-DS] Guest

    Re: Server will not shutdown or log off

    Have had issues such as this in the past on our Dell's (Don't think it is
    Dell related though). We would issue remote shutdown commands and sometimes
    the system wouldn't completely shutdown and it went into the undead state.
    Anyone connected to the machine still worked but no new connections allowed
    and no access to the console. Found out from Microsoft the shutdown command
    isn't the greatest and so I wrote a VBScript that has resolved the issue.

    This isn't the greatest code in the world, I should correct it so the values
    are all defined in the variables section but use it if you find value to it.


    Option Explicit

    ''''''''''''''''''''''''''''''''''''''''''''''''''

    ' Program - RemoteReboot.vbs '

    ' Author - Paul Bergson '

    ' Date Written - 08/15/07 '

    ' Description - Is a more drastic remote reboot '

    ''''''''''''''''''''''''''''''''''''''''''''''''''

    Dim OpSysSet

    Dim OpSys

    Dim strComputer

    Dim iMsg

    Dim iConf

    Dim Flds

    Dim strSubject

    Dim strHTML

    on error resume next

    strComputer = WScript.Arguments.Item(0) 'Get server name

    If WScript.Arguments.Count = 1 Then

    Set OpSysSet = GetObject("winmgmts:{(Shutdown)}\\" _

    & strComputer _

    & "\root\cimv2").ExecQuery("select * from Win32_OperatingSystem where
    Primary=true")

    For Each OpSys in OpSysSet

    OpSys.Reboot()

    Next

    Else

    Wscript.Echo "Server Name required. Reboot operation Aborted!"

    Wscript.Quit

    End If


    'Send out an e-mail on the reboot

    set imsg = createobject("cdo.message")

    set iconf = createobject("cdo.configuration")

    Set Flds = iConf.Fields

    With Flds

    ..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

    ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
    "Yoursmtp.YourDomain.com"

    ..Update

    End With

    strHTML = strComputer & " has been automatically rebooted by YourServerName"
    _

    & " on " & FormatDateTime(Date(),1) & ", " & FormatDateTime(Time(),3)

    strSubject = strComputer & " has been rebooted"

    With iMsg

    Set .Configuration = iConf

    ..To = "Notification Email@YourDomain.com" ' Destination e-mail address

    ..From = "ServerName@YourDomain.com"

    ..Subject = strSubject

    ..HTMLBody = strHTML

    ..Send

    End With

    set imsg = Nothing

    set iconf = Nothing


    --
    Paul Bergson
    MVP - Directory Services
    MCTS, MCT, MCSE, MCSA, Security+, BS CSci
    2008, 2003, 2000 (Early Achiever), NT4

    http://www.pbbergs.com

    Please no e-mails, any questions should be posted in the NewsGroup
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Glenn Hayes" <GlennHayes@discussions.microsoft.com> wrote in message
    news:C2A1A98A-CD52-443B-B7BE-422EAA5225C1@microsoft.com...
    > W2k3 R2 sp2 will not respond to a log off or shutdown command. Nothing
    > unusual logged in the event log. Removed APC UPS software to eliminate
    > that
    > possiblity. Can't seem to find anything that is not right but it is slow
    > to
    > respond and no response on shutdown, restart or logoff. Server is a Dell
    > 2850
    > Dual proc server.
    > --
    > Glenn Hayes




  3. #3
    Glenn Hayes Guest

    Re: Server will not shutdown or log off

    Good Idea just having compile errors with the script arount the Set OpSysSet
    = GetObject("winmgmts:{(Shutdown)}\\" _ line.
    Working my way throough the script to see if can make it work.
    --
    Glenn Hayes


    "Paul Bergson [MVP-DS]" wrote:

    > Have had issues such as this in the past on our Dell's (Don't think it is
    > Dell related though). We would issue remote shutdown commands and sometimes
    > the system wouldn't completely shutdown and it went into the undead state.
    > Anyone connected to the machine still worked but no new connections allowed
    > and no access to the console. Found out from Microsoft the shutdown command
    > isn't the greatest and so I wrote a VBScript that has resolved the issue.
    >
    > This isn't the greatest code in the world, I should correct it so the values
    > are all defined in the variables section but use it if you find value to it.
    >
    >
    > Option Explicit
    >
    > ''''''''''''''''''''''''''''''''''''''''''''''''''
    >
    > ' Program - RemoteReboot.vbs '
    >
    > ' Author - Paul Bergson '
    >
    > ' Date Written - 08/15/07 '
    >
    > ' Description - Is a more drastic remote reboot '
    >
    > ''''''''''''''''''''''''''''''''''''''''''''''''''
    >
    > Dim OpSysSet
    >
    > Dim OpSys
    >
    > Dim strComputer
    >
    > Dim iMsg
    >
    > Dim iConf
    >
    > Dim Flds
    >
    > Dim strSubject
    >
    > Dim strHTML
    >
    > on error resume next
    >
    > strComputer = WScript.Arguments.Item(0) 'Get server name
    >
    > If WScript.Arguments.Count = 1 Then
    >
    > Set OpSysSet = GetObject("winmgmts:{(Shutdown)}\\" _
    >
    > & strComputer _
    >
    > & "\root\cimv2").ExecQuery("select * from Win32_OperatingSystem where
    > Primary=true")
    >
    > For Each OpSys in OpSysSet
    >
    > OpSys.Reboot()
    >
    > Next
    >
    > Else
    >
    > Wscript.Echo "Server Name required. Reboot operation Aborted!"
    >
    > Wscript.Quit
    >
    > End If
    >
    >
    > 'Send out an e-mail on the reboot
    >
    > set imsg = createobject("cdo.message")
    >
    > set iconf = createobject("cdo.configuration")
    >
    > Set Flds = iConf.Fields
    >
    > With Flds
    >
    > ..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    >
    > ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
    > "Yoursmtp.YourDomain.com"
    >
    > ..Update
    >
    > End With
    >
    > strHTML = strComputer & " has been automatically rebooted by YourServerName"
    > _
    >
    > & " on " & FormatDateTime(Date(),1) & ", " & FormatDateTime(Time(),3)
    >
    > strSubject = strComputer & " has been rebooted"
    >
    > With iMsg
    >
    > Set .Configuration = iConf
    >
    > ..To = "Notification Email@YourDomain.com" ' Destination e-mail address
    >
    > ..From = "ServerName@YourDomain.com"
    >
    > ..Subject = strSubject
    >
    > ..HTMLBody = strHTML
    >
    > ..Send
    >
    > End With
    >
    > set imsg = Nothing
    >
    > set iconf = Nothing
    >
    >
    > --
    > Paul Bergson
    > MVP - Directory Services
    > MCTS, MCT, MCSE, MCSA, Security+, BS CSci
    > 2008, 2003, 2000 (Early Achiever), NT4
    >
    > http://www.pbbergs.com
    >
    > Please no e-mails, any questions should be posted in the NewsGroup
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    > "Glenn Hayes" <GlennHayes@discussions.microsoft.com> wrote in message
    > news:C2A1A98A-CD52-443B-B7BE-422EAA5225C1@microsoft.com...
    > > W2k3 R2 sp2 will not respond to a log off or shutdown command. Nothing
    > > unusual logged in the event log. Removed APC UPS software to eliminate
    > > that
    > > possiblity. Can't seem to find anything that is not right but it is slow
    > > to
    > > respond and no response on shutdown, restart or logoff. Server is a Dell
    > > 2850
    > > Dual proc server.
    > > --
    > > Glenn Hayes

    >
    >
    >


Similar Threads

  1. Server 2003 Unexpected Shutdown
    By imnotorginal in forum Operating Systems
    Replies: 1
    Last Post: 10-05-2010, 11:54 PM
  2. DDE server window problem at shutdown
    By Mind It in forum Operating Systems
    Replies: 3
    Last Post: 26-09-2009, 10:54 AM
  3. How to boot and shutdown a system via server
    By Brendan18 in forum Networking & Security
    Replies: 3
    Last Post: 10-07-2009, 05:58 PM
  4. Shutdown a server using the power button
    By Artificer in forum Windows Server Help
    Replies: 7
    Last Post: 27-08-2008, 11:56 PM
  5. Windows 2003 Server Unexpected Shutdown
    By jlm in forum Windows Server Help
    Replies: 4
    Last Post: 01-03-2007, 02:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,039,170.39763 seconds with 16 queries