I’m in the process of constructing a new, advanced book on Windows PowerShell, which I’ve mentioned before. This time, I’m going to try something I’ve never tried with a book before: Making it more of a community effort. If you’ve ever complained that a book doesn’t cover exactly what you want, this is your chance – get in on the ground floor!
Category: General
PrimalToys for PowerShell
Get some great new “toys” for Windows PowerShell in this “alpha” release of “PrimalToys for PowerShell.” More than a dozen new cmdlets to help manage computers, work with databases, and all kindsa fun stuff.
Training Partner Program Launch
We’ve officially launched our training partner program, with details at www.ScriptingTraining.com/partners.asp. The goal of the program is to develop a network of training centers and trainers throughout the world who can deliver our ScriptingAnswers.com LIVE!-branded classes, using the same courseware we use in our public classes (which are now available in 10 North American locations in […]
PrimalScript 4.1.533 now available
SAPIEN Technologies announces a new service release for PrimalScript: Build 533 is a free upgrade to all PrimalScript 4.1 owners. In addition to a number of minor fixes (documented at www.sapien.com/support.asp; select “Change Logs”), several minor new features have been added. Windows PowerShell users will find that their profiles now load when running PowerShell scripts […]
Welcome to our new blog.
After a horrible experience with our original blog hosting provider, we’ve moved to a new system. Hopefully it’ll be a great experience – it sure has been so far, with the staff being extremely responsive to help us get set up and to import our old content. The original blog will still be available for […]
Make-A-Cmdlet: Part 7, The Files
Per popular request, attached is a ZIP file containing the original VB.NET files I used to build my sample cmdlet (only the cmdlet and snap-in files are included; you’ll ned to build your own project in PrimalScript or Visual Studio). But wait… there’s more. This is actually part of a larger PrimalToys snap-in I’ve made, which will be available on …
Want a Makeover?
Don’t even read the rest of this blog entry – just go to www.ScriptingMakeover.com. Here’s the deal: You tell us about your most time-consuming Windows administrative tasks. We’ll pick one luck company or organization (United States only – sorry, it’s a legal thing) based on their entry form – and award them over $20,000 in training, resources, […]
Using ErrorVariable
Another common parameter you might want to include in your PowerShell code is -ErrorVariable. Like -OutVariable that I talked about yesterday, you can redirect error information to a specified variable:gwmi win32_operatingsystem -errorvariable oops |out-null
"Out, out damn variable"
Ok, maybe I’m not Lady Macbeth dealing with a guilty conscience but there are times I have to get things out of my system, like information via PowerShell. Often I want to store the results of a cmdlet in a variable for additional processing. Usually I do something like this:$myProcesses=get-processAn alternative is to use one of the common paramaters, -OutVariable.
Make-A-Cmdlet: Part 6, Wrapup
Okay, in my cmdlet code, you’ll notice that I used WMI – albeit in a very .NET-esque fashion – to ping a remote computer. That’s kind of my VBScript background talking; WMI is how I’d do the same task in VBScript. Well, it pays to investigate: Turns out .NET has a built-in functioning for pinging computers! I can change my …