How to logout of windows desktop from command line - (tsdiscon)
Background: I had setup a windows machine that I setup to be used as a papercut print terminal. I had removed all logout options on windows as you can see below on the start menu.
So for making changes such as adding things like scheduled tasks you have to login to the admin account, and to do that you use the tsdiscon command from a powershell or cmd window.
Which will then log you out of windows and you can login as any account you have active on the machine, in this case the admin account as shown below.