Automatically sign out users from Windows Server, weekly

m0chi 1 Reputation point
2020-12-17T15:48:48.513+00:00

We have GPO set up to check for Windows Updates from WSUS every Friday night (even if MS has not released them yet) and reboot the Windows server if an update was applied, however the server will not reboot if an admin user is logged in. For convenience we keep a shared domain RDP account logged in since some of the programs take a very long time to load. I'm looking for a way to log off the RDP users every Friday evening so Win Updates can run and the server can automatically reboot. There are many servers, so manually logging out the users weekly would be very tedious. Is there any way to automate this?

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,739 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,112 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Dave Patrick 426.1K Reputation points MVP
    2020-12-17T15:52:59.517+00:00

    You can create a scheduled task that executes
    shutdown /l
    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/shutdown

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  2. Vicky Wang 2,646 Reputation points
    2020-12-18T09:32:53.557+00:00

    Hi,

    Thank you for posting in our forum

    What you will need to do is link the policy to an OU, say, Terminal Servers. In the security filtering, you would select the group (Affected Users) of users to which you

    want it applied. Then you would have a policy applied to the servers in Terminal Servers that only affect those in the Affected Users group. You could always make a new

    group and call it 'Log Off' or something and add all the users you want to log off to that group.

    Hope this information can help you

    Best wishes
    Vicky

    0 comments No comments

  3. Vicky Wang 2,646 Reputation points
    2020-12-24T08:36:28.88+00:00

    Hi,

    Just checking in to see if the information provided was helpful.
    Please let us know if you would like further assistance.

    Best Regards,
    Vicky

    0 comments No comments