Link to home
Create AccountLog in
Avatar of Thomas_Meyer
Thomas_MeyerFlag for Czechia

asked on

How to use VB script to log off users.

Hi need help with simple vb script, which is currently logged on users opt out of the system - the exact equivalent command in cmd: shutdown/l
Thanks.
Avatar of Bill Prew
Bill Prew

Are you trying to shutdown the machine the VB script will be running on, or some remote machine?

~bp
run this using the VB shell command
shell "shutdown /l"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
@Bill, you probably should have used
   oOS.Win32shutdown EWX_LOGOFF + EWX_FORCE

That would be good for remote computers though.

Rob.
Yikes, thank Rob.  Somewhere I was thinking the question was looking for a shutdown but on reread I see it was indeed a logoff, thanks.

~bp
Avatar of Thomas_Meyer

ASKER

Perfect, thanks.