Script Dumpster: Online-ADComputers

The Problem

Today I ran into something simple….but I just wanted to get it solved through PowerShell and make the solution re-usable.

We had found a machine in Active Directory which didn’t turn up in the physical inventory check…
And worse of all, the machine was active!

The Script

This script simply checks if machines with a specific name [or in a specific OU] is online at the moment.
If it’s online, it will try and figure out who’s actually logged on to the machine.

The output of course is in objects, so you can use whatever kind of formatting on the result of the script

Happy scripting! 🙂



It never hurts to Get-Help

Leave a Reply

Your email address will not be published. Required fields are marked *