A while back I posted an advanced PowerShell function that would take an object and convert it to a hashtable. The premise was simple enough: look at the incoming object with Get-Member to discover the property names then create a hashtable with each property name as a hashtable key. I’ve a need to use this…
Category: PowerShell
Silly Saturday PowerShell Palindromes
Normally I post amusing PowerShell-related content on Fridays as part of my Friday Fun series. These are light-hearted articles about using PowerShell. Almost always they are not practical but they serve as a learning vehicle. My topic this week seems extra silly so I’m moving it to Saturday. I’m a pushover for alliteration. Last week…
Rename Hashtable Key
I use hashtables quite a bit. Often generating hashtables on the fly from other sources. But sometimes the hashtable keys that come from these external sources don’t align with what I intend to do with the hashtable. For example, one of the nifty things you can do with hashtables is splat them against a cmdlet…
PowerShell Console Graphing Revised
Many of you have been having fun with my PowerShell Console Graphing tool I posted the other day. But I felt the need to make one more major tweak. I wanted to have the option for conditional formatting. That is, display graphed entries with high values in one color, medium in another and low in…
PowerShell Screen Shots
Yesterday I posted a tool that creates a console-based graph. That command uses Write-Host which means nothing is sent to the pipeline. The only way you can really save the result is with a screen capture. Of course, you can manually use whatever screen capture program you like. If you have something like Snagit you…
Graphing with the PowerShell Console
I’ve written before about using the PowerShell console as a graphing tool, primarily using Write-Host. Most of what I’ve published before were really proof of concept. I decided to try and come up with a more formal and re-usable tool that could create a horizontal bar graph based on a numeric property from piped objects….
Special PowerShell and Group Policy Session Feb 6
If you are involved with managing Group Policy, then you most likely know of Group Policy MVP Jeremy Moskowitz. If you live live in the NY, PA or NJ area (or like to travel), then you might also be interested a week long class on Group Policy the week of February 4th, 2013. The class…
Hyper-V ID Hash Table
In Hyper-V, one of the challenges (at least that I’ve run into) has to do with naming. In addition to a name, Hyper-V objects such as virtual machines, are identified with a GUID. Most of the VM-related PowerShell cmdlets will let you specify a virtual machine name. But sometimes you’ll run across the GUID and…
Friday Fun: Job Announcer
Last week I came across some people having fun with the SAPI.SPVoice COM object. This is the object that lets your computer “speak”. If you’ve never played with this, it is very simple to do in PowerShell. The voice quality in Windows 7 and 8 is quite nice, as far as synthetic voices go. $v…
Friday Fun – Get Happy Holiday
Today’s Friday Fun is my version of a script originally posted a few years ago by The PowerShell Guy. I’ll list the code but you really need to run it to enjoy it. #requires -version 2.0 #This must be run from the PowerShell console. NOT in the ISE. #this is based on a script originally…
Create PowerShell Scripts with a Single Command
One of the drawbacks to using a PowerShell script or function is that you have to write it. For many IT Pros, especially those new to PowerShell, it can be difficult to know where to start. I think more people would write their own tools if there was an easy way to automatically write them….
Copy and Mount a CD with PowerCLI
The other day I realized I needed to rebuild my SQL Server 2012 installation which I’m running on a virtual machine running on an ESX box. Given that I have PowerCLI and I like to do things from the command prompt when I can, I decided to mount the SQL Server 2012 ISO on the…
Learn PowerShell 3 in a Month of Lunches now available
I am very happy to report that the new version of Learn PowerShell 3 in a Month of Lunches is now available from Manning. This is the second edition of the popular book originally authored by PowerShell legend Don Jones. Don invited me to collaborate on the second edition which covers PowerShell v3 and I…
Importing Hyper-V VM from a PowerShell Backup
My Petri article this week is on importing Hyper-V VMs from a backup. http://bit.ly/PRE0pk I have many more articles on Hyper-V on Windows 8 on the site as well. You can find all of my recent posts here.
Honorary Scripting Guy
I am pleased, honored and humbled to be selected as an Honorary Scripting Guy for 2012. I certainly would like to thank Ed Wilson, THE Scripting Guy. I would also like to congratulate my fellow honorees. If you aren’t following these people on Twitter, G+ or the blogosphere you are missing out on a wealth…