Archive for PowerShell Scripting

How to become a DIMM-wit!

I was going through the mail-bag the other day and noticed the same question kept popping up. "How do I know how much memory is in my system?" I thought to myself, that question is too easy to answer and the PowerShell solution has to be available on at least a few thousand websites. But, [...]

A Problem with the Microsoft Script Repository?

I enjoy the Microsoft PowerShell Script Repository and all the examples provided. I have used many of the examples within PowerShell Tutorials and Articles (including this one) written on this site. However, there is a problem with using the “Write-Host” cmdlet that has frustrated myself along with many others; I have the hate-mail to prove [...]

WMI Explorer : Script-O-Matic for PowerShell

Over the last couple of weeks I’ve been working on a 3 part tutorial for WMI. In my adventures to see what others have written about on the subject, I found a remarkable tool (actually a .ps1 script) written by Marc van Orsouw aka “ThePowerShellGuy.” This is a tool even Batman should have on his [...]

How to retrieve a list of Computer Accounts from Active Directory

I've written a few posts and a couple of tutorials that discuss connecting to remote machines. For example:

3 easy steps to get information from remote computers

PowerShell Scripting with WMI Part 1.

In each of these articles an array is used to connect to multiple remote computers. The procedure consists of placing computer names in a text [...]

Why would I want to call a function that exists in a separate script?

DR. Tom Moreau posed the following question, “Is there a way to call a function that resides in a separate script, along the lines of Perl’s use statement? I don’t want to have to load each function script manually into the current PS session.”
I said sure, take a look at my article on organizing script [...]

“Let’s do the Time Zone Again…”

I’ve gotten a number of inquiries about the VBScript I wrote for checking time zone settings. Now that it’s getting closer to Standard Time people are getting jumpy again. New servers have been added to the data center over the last few months; are the DST settings correct? Instead of sharing the VBScript code, let’s [...]

We Don’t Need No Stinkin’ Scripts…

Another reason to love PowerShell… the command line. We work directly with objects in the command shell; minimal code required. The days of writing VBScripts to pull system information is long gone. Still hanging on to VBScript, resistant to change, this article may just change your mind…

Organizing Script Code – Calling Scripts from Other Script Files

Each one of us has our own style in the way we accomplish tasks, scripting is no different. My style is modular scripting; where I build libraries of functions (code blocks) and control script flow by calling functions in the order I choose. By maintaining a large library of user-defined functions (custom functions), I “snap-in” [...]

3 Easy Steps to Get Information from Multiple Remote Computers…

As I perused the "Computer Hardware" section of the PowerShell Script Repository, I noticed that every PowerShell script uses the $strComputer = "." variable. Meaning the script only enumerates information on the "Local Computer." Not very practical in the "real-world," I don't know too many of you running scripts locally on each computer in your [...]