Which user logged on machine




















Hi Leos, thanks for your reply and sorry I took so long to get back. I was able to find a solution by the code below. It's probably very basic and could be improved but I'm learning as I go. The intention of this is that I wrote a PowerShell script that my team can run every morning that checks to see whether about 20 computers are on.

If they are on we make sure they are logged in and we also check to make sure they are running specific programs. I incorporated this into the script so that we can validate whether the account StatPC is logged in or out or if the computer is even powered on.

Nothing works from here. What about the domain settings? I think to make this work it is required to enter the domain and to use the correct filters, because I'm sure that the command depends on how the domain configs are set.

Your email address will not be published. Notify me of followup comments via e-mail. You can also subscribe without commenting. Receive new post notifications. Member Leaderboard — Month. Member Leaderboard — Year. Author Leaderboard — 30 Days. Author Leaderboard — Year. Vignesh Mudliar posted an update 17 hours, 14 minutes ago. Vignesh Mudliar posted an update 17 hours, 15 minutes ago.

Vignesh Mudliar posted an update 17 hours, 16 minutes ago. Vignesh Mudliar posted an update 17 hours, 21 minutes ago. Paolo Maffezzoli posted an update 17 hours, 41 minutes ago. Paolo Maffezzoli posted an update 17 hours, 42 minutes ago. Please ask IT administration questions in the forums. Any other messages are welcome. Receive news updates via email from this site. Toggle navigation. A common task any Windows admin might have is finding out, locally or remotely, which user account is logged onto a particular computer.

Many tools exist for this purpose, and one of them, of course, is PowerShell. Author Recent Posts. Adam Bertram. Latest posts by Adam Bertram see all. Without specified computer name.

Queried a remote computer. Different computer names. Email Address. Mailing List. Related Articles. Ashish Singh 5 years ago. Roi 5 years ago. Marc 4 years ago. Yeah this isn't working for me either. Luc Fullenwarth Rank: 4 4 years ago. What is you client OS and powershell version? What is the OS and. Compile the script.

Execute it in Windows PowerShell. ADAudit Plus To obtain the report, 1. We can run this script only from the computers which has Active Directory Domain Services role.

Best eReaders. Best Gaming Monitors. Best Android Phones. Browse All News Articles. Prey Predator Prequel Hulu. Window 11 SE Downgrade. Disney Plu TikTok. Windows 11 Default Browser Block. Teams in Windows 11 Taskbar. Smart TVs Ads. Team Comes to Workplace by Meta. Block People Spotify. Verizon Selling PS5. Windows 11 SE Explained. Find Downloaded Files on an iPhone. Use Your iPhone as a Webcam. Hide Private Photos on iPhone. Take Screenshot by Tapping Back of iPhone. Hope he keeps updating and adding to the suite.

That's a new can of worms that I don't feel like opening right now, so I checked into psloggedon and I'm quite happy. The reason is that more than one user may be logged in. Fast user switching etc. I t keeps the other user logged on. Name WScript. FullName WScript. Domain Next Wscript. StartTime WScript. Echo Next End If. Zypher The Overflow Blog. Does ES6 make JavaScript frameworks obsolete?



0コメント

  • 1000 / 1000