Announcement

Collapse
No announcement yet.

Any way to force a logoff of the console user from command line?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Any way to force a logoff of the console user from command line?

    We've got a server that needs to reboot every night and there have been instances where someone was logged in to the console, which caused this to fail. Currently, we're just doing a "shutdown /r" at the end of a script that runs as a scheduled task.

    Is there anything that we could add into that script that would force anyone currently logged on, including on the console, to log off and make sure the machine goes down and reboots?

  • #2
    Re: Any way to force a logoff of the console user from command line?

    shutdown /?

    try the -f switch, or you can run shutdown -l first.

    Comment


    • #3
      Re: Any way to force a logoff of the console user from command line?

      Use the -f switch like suggested i.e. shutdown.exe -r -f
      This will force the shutdown regardless if the system is waiting for user input or not.

      I don't think the -l switch will work because it needs to be run as the user being logged off.
      Regards,
      Jeremy

      Network Consultant/Engineer
      Baltimore - Washington area and beyond
      www.gma-cpa.com

      Comment

      Working...
      X