Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! How Can I Pull Server Diagnostic Information and Have It Saved in an Excel Spreadsheet with a Chart?

Hey, Scripting Guy! Good morning. I would like to use WMI to get diagnostic information for my server. I would like to be able to do this remotely and to write the results to an Excel spreadsheet. When I am done, I would like the spreadsheet to also create a chart of the results. Is this asking too much? I have seen pieces of all this on the...

Hey, Scripting Guy! How Can I Collect Processor Information?

Hey, Scripting Guy! I am interested in using Windows PowerShell to collect processor information, but I do not need to see the raw data. I would rather see calculated results such as the maximum, minimum, and average processor utilization. I know I can do this, but that seems like writing a lot of math formulas, and I just am not in the mood...

Hey, Scripting Guy! How Can I Determine the Average Process Utilization for My Computer?

I would like to determine the average processor utilization for my computer over a certain period of time. If I could run this remotely, it would be even better. Can this be done?- MP Hi MP, We can certainly do this. In fact, it can be done both locally and remotely. But you do need to be careful of the Heisenberg uncertainty principle. ...

Hey, Scripting Guy! How Can I Control the Data Returned by the Performance Monitor Tool?

Hey, Scripting Guy! I really like using the Microsoft Performance Monitor (PerfMon) tool to examine the various things in Windows Server, but I would like to have more control over the data that it retrieves. I am never sure what it is actually telling me, or how it makes its calculations. Does this make sense?- SK Hi SK, There are lots of ...

Hey, Scripting Guy! How Can I Find Locked-Out Accounts?

Hey, Scripting Guy! I know we probably should not do this, but we have account lockout set at work. If a user types in too many bad passwords, they are locked out forever. It requires a call to the help desk to have their account unlocked. The problem is that some users who are shall we say “less motivated” simply refuse to work. They ...