I have several windows 7/2008 workstation in my domain environment. we have a GPO that autolock window if no one is working on it(idle). (No screensaver just lock)
How can I remotely check whether the remote workstation is Locked or Unlocked? I tried to query user using quser command (tested on user whose windows is locked or another user whose windows is unlocked, same result)
C:\>psexec \\REMOTEPC1 quser USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME USER1 console 1 Active none 1/24/2017 11:21 AM
the above result is showing STATE=ACTIVE, but I am unable to query if the workstation is LOCKED/UNLOCKED. howto get required result instantly by command or method??