Command Line Logoff or Switch Users

  • Thread starter Thread starter Tanch
  • Start date Start date
T

Tanch

Anyone know of a way to logoff a user or switch users
from command line. I tried the logoff command but it is
not included in my image. If LOGOFF is the only way,
anyone know which component to use?

Thank you very much
 
Tanch,

You can use "rundll32.exe user32.dll, LockWorkStation" command to switch to Logon window if "Fast User Switching" service is
running. It will just lock the workstation if the service is stopped or disabled.

You can also use logoff.exe utility from "Terminal Services Remote Management and Command Line Tools" component to log off from the
active user.
 
Thank you very much KM.
-----Original Message-----
Tanch,

You can use "rundll32.exe user32.dll, LockWorkStation"
command to switch to Logon window if "Fast User
Switching" service is
running. It will just lock the workstation if the
service is stopped or disabled.
You can also use logoff.exe utility from "Terminal
Services Remote Management and Command Line Tools"
component to log off from the
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top