26th September 2007, 06:34 pm
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…
Continue reading ‘We Don’t Need No Stinkin’ Scripts…’ »
16th September 2007, 09:21 pm
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" new functionality within my PowerShell scripts, with ease.
I'm also a firm believer that cleanliness is next to Script-Godliness. PowerShell scripts should be well written so that other administrators can easily understand and follow your code. Using a template, which I've provided below, is a great way to organize your scripts. Copy and paste the following template into notepad and name it PowerShellTemplate.ps1.
Continue reading ‘Organizing Script Code - Calling Scripts from Other Script Files’ »
5th September 2007, 05:09 pm
New PowerShell Book: "Windows PowerShell : The Definitive Guide" by -Lee Holmes.
A new PowerShell book from another member of the PowerShell developer team. I can't wait to read this one, the O'REILLY books have always been top-notch. "Windows NT In A Nutshell" by -Eric Pearce was my first exposure to the "Animal" books. Lee Holmes's PowerShell book is due for release October 15th 2007, so look for it. Once I get my copy and read through it, I'll post a review. Here is an overview of the book taken (verbatim) from the O'REILLY web-site:
Continue reading ‘Windows PowerShell : The Definitive Guide’ »
1st September 2007, 05:02 pm
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 environment (excluding log on scripts of course…). This article expands on the Microsoft provided examples by exhibiting how to remotely connect to multiple computers and enumerate data, even if you have thousands of computers to inventory…
Continue reading ‘3 Easy Steps to Get Information from Multiple Remote Computers…’ »