ConfigMgr Run Scripts -> Get-MachineInfo

Another Simple Script, no Parameters on this, just run and grab a bunch of information.
Why use Run Script? Since I don’t have Remote PowerShell access, I can run the Run Script to get info from a remote PC over Client Management Gateway (CMG).

Now the output isn’t as pretty in a Run Script as it is in PowerShell… but at least you can grab the info.

But Gary, all of this info is already available in CM reports, etc?

Is it??

I’ve noticed that sometimes the “Logged on User” in CM is blank, when in fact, someone is logged on. I’ve rebooted machines in the past ASSUMING no one was logged on… I don’t do that anymore.

Also, I want to get “What is the machine like at this exact second” information. Reports can be hours or days behind. I also want to know when the last reboot happened and calculate how long ago that was, as well as the Local Time on that computer. I don’t know what Time Zone it is in, and if I’m working on a machine across the world, if it’s after hours, that’s important info to know.

Get the Script in my GitHub: Get-MachineInfo.ps1

Script Output in PowerShell:

Run Script Output:

GARYTOWN.COM

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.