As promised, I’ve assembled my demo scripts as well as the transcriptfrom my TechEd 2010 talk Paradigm Shift Microsoft Visual Basic Scripting Edition to Windows PowerShell. The official slide deck is supposed to be available on the TechEd web site. I’m going to post an expanded version of the deck here sometime next week. In…
Category: PowerShell v2.0
Microsoft Deployment Toolkit PowerShell Wizard
During the last TechMentor conference in Orlando, deployment MVP and guru (I want to call her a deployment diva but I don’t want people to get the wrong idea. Think “diva” in the star sense without the ego and entourage,) Rhonda Layfield asked me to look at some PowerShell code. She was trying to make…
Microsoft TechEd NOLA
I’m very excited about Microsoft TechEd next week in New Orleans, LA. I’ll be presenting Tuesday afternoon at 1:30PM. The official title is “Paradigm Shift: Microsoft Visual Basic Scripting Edition to Windows PowerShell”. In more practical terms, I’ll be talking about the necessary mind shift in moving from VBScript to PowerShell. I’ll talk about what…
Get Parent Process
Recently I helping out on a post in the forums at ScriptingAnswers.com. The question centered around identifying processes on a computer and their parent process. There are many ways you could slice and dice this problem using WMI and Get-WmiObject. Getting the parent process ID is pretty simple, but going backwards from there to identify…
Join Object
Related to some of the WMI stuff I’ve been working on lately is the idea of melding or joining objects. This comes about because I often see forum posts from administrators looking to collect information from different WMI classes but present it as a single object. One way you might accomplish this is to create…
Select WMI
I’ve been helping out on some WMI and PowerShell issues in the forums at ScriptingAnswers.com. As I was working on a problem I ended up taking a slight detour to address an issue that has always bugged me. When I run a command like this: get-wmiobject -query “Select Name,Description,Disabled from Win32_UserAccount” PowerShell wants to return…
Content Redirection
Here’s another item I see in some submisstions of the 2010 Scripting Games that I felt I should address: the use of legacy console redirection. While technically not illegal or wrong, an example like this demonstrates (at least in my opinion) that the scripter hasn’t fully adopted the PowerShell paradigm. $computers=get-content "computers.txt" $data=foreach ($computer in…
Bool vs Switch
I have to say I’m generally impressed with the quality of submissions to this year’s Scripting Games. But there is a recurring concept that some people are using and I think there’s a better way. Some contestants are defining function or script parameters as booleans. But I believe they really should be using the [switch]…
Verbose Variations
While I’ve been judging entries in the 2010 Scripting Games, I’ve noticed a few things that I thought I would comment on here. In longer and complicated scripts, I’ve always suggested script developers provide some sort of feedback about what the script is doing. Typically this is done with Write-Host, but there are several ways…
PowerShell vs Jesus
Ok. I decided it’s time I finally weigh in on this with more than 140 characters. I’m sure you’ve seen, in forums, Twitter and other social media comparisons between Windows PowerShell and some other shell of choice. Typically the “other” shell is LInux based and the comparison is thrown down as a challenge, “Which is…
PowerShell for Developers
I’ll be presenting before the CNY Developers Group on May 5, 2010. The topic of my talk will be an introduction to Windows PowerShell 2.0 aimed at a developer audience. I’ll talk about PowerShell as a management shell, its architecture, some scripting basics and how PowerShell relates to .NET and developers. If you are in…
PowerCLI Get-VMToolsVersion
I recently was able to upgrade my VMware server so that I can now fully use the PowerCLI tool set. This is fantastic PowerShell goodness that I hope to use and write about much more in the future. Part of my upgrade process includes upgrading the VMToools install on the virtual machines. But what wasn’t…
Remote PowerShell Performance Comparison
Fellow Windows PowerShell MVP Marco Shaw clued me in on a Microsoft blog post that did a terrific job of comparing, from a performance perspective the different PowerShell 2.0 techniques you can use when managing remote computers. The results are pretty much as I would expect.
PowerShell Quick Start on Server Core R2
The great thing about the Server Core flavor that ships with Windows Server 2008 R2 is that it finally supports Windows PowerShell. I’ve talked about this before. However, I think I neglected some of the finer points in getting started. You can (and should) run PowerShell on your R2 Core servers. More than likely you…