
The problem is, this is just a string array. Randomnote1 console 1 Active none 6:52 AMĬool, we can clearly see that the user randomnote1 is logged onto this computer. When we examine the contents of the $quserResult variable it contains a nicely formatted table USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME $quserResult = quser /server:$computer 2>&1 Now, let’s use the quser (query user) command to get all the user sessions on the computer. So my first thought to that is “Very carefully!” Let’s simplify the question by looking at one specific computer.įirst, let’s define the username and computer name we’re investigating. He actually ran into that same issue.ĭan, the room is yours today, take it away! Dan is a Senior Consultant on Data Platforms here at Microsoft.

I was talking my good friend Dan Reist on this topic. That’s a most excellent question! I know just the person who can answer that. How can I discover which computers they’re logged into and then log them off?

Hey Doctor Scripto! I need to log a user off every computer they’re logged into. Summary: Using PowerShell to automate Quser to identify users to Logoff systems in Windows
