I’ve started working on the 2nd edition of Managing Active Directory with Windows PowerShell: TFM. As with almost all of my writing projects it will be full of PowerShell code examples. In the past I’ve always relied on a manual copy and paste to add content to the manuscript. The PowerShell Community Extensions made this…
MVP #4
I’m happy to report that I am yet again a Microsoft MVP for Windows PowerShell, now for my 4th year in a row. Dear Jeffrey Hicks, Congratulations! We are pleased to present you with the 2010 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real…
Objects are the answer
As I usually do, I was helping out in the forums at ScriptingAnswers.com. A member had several variables that he wanted to show as a group. As is almost always the case, the answer in PowerShell is object. I talk about this all the time in classes, conferences and online chitchat. Let me offer up…
New Book Project – Reviewers Needed
While at Microsoft TechEd, I signed the paperwork to write a second edition of Managing Active Directory with Windows PowerShell: TFM for SAPIEN Press. It’s hard to believe so much has happened since that book hit the shelves in less than 2 years. The 2nd edition will continue to include coverage of Quest Software’s PowerShell…
TechEd 2010 VBScript to PowerShell
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…
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…