Logoff All users

A

Al

How can I safely script logging off all my terminal
service users that are connected. I know you can do
individual users but how can you do all of them?
 
M

Matthew Harris [MVP]

Try this:

for /f "tokens=2" %i in ('qwinsta ^| find /i "listen"') do
echo y | rwinsta %i

-M
 

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

Top