How to logoff all disconected users from a machine
You may have run in many situations when the users forgot to logoff from a session and they remain in a disconnected state, consuming resources.
If you have more than a few users to sign out, or if task manager isn’t responding and using cmd takes too long, you can sign out all of them at once.
In order to this, run Powershell as administrator and paste the following command: