Last week I posted my demo slides as well as my demo videos. As promised, I’ve gone through and expanded a bit on my original slide deck. TechEdNA-2010-Hicks-ParadigmShift is a 3MB PDF of my expanded PowerPoint slide deck. If you have any questions about the content or what it takes to get your head from…
Tag: PowerShell
TechEd 2010 Demos
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…
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…
New WMI Object
I have one more variation on my recent theme of working with WMI objects. I wanted to come up with something flexible and re-usable where you could specify a WMI class and some properties and get a custom object with all the classes combined. My solution is a function called New-WmiObject. Function New-WMIObject { [cmdletbinding()]…
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…