I’ve been experimenting with different techniques to work with PowerShell in graphical ways, but without resorting to complex solutions such as WinForms or ShowUI. For today’s Friday Fun I have a little script that presents a drive usage report using WMI and Out-GridView. As always, my goal with these articles is to impart a nugget…
PowerShell Hyper-V Memory Report
Since moving to Windows 8, I’ve continued exploring all the possibilities around Hyper-V on the client, especially using PowerShell. Because I’m trying to run as many virtual machines on my laptop as I can, memory considerations are paramount as I only have 8GB to work with. Actually less since I still have to run Windows…
PowerShell Workflow Bug
There is bug with workflows in PowerShell v3 that you might run into. I kept banging into it until I tracked it down. The problem occurs if you try to run a workflow from a PSDrive that you have added. For example, I have a PSDrive (S) which is mapped to C:\Scripts. When I try…
Surviving the Zombie Apocalypse
I got this announcement the other day for a Halloween webinar and the title is just too cool not to share: “Surviving the Zombie Apocalypse: Protecting Both Your Brains and Your Data.” I hope it goes without saying that data protection is a big part of an IT Pro’s job so anything we can learn…
Variable Validation
In PowerShell v3 there is a new feature you might not be aware of that could save you pain and headaches. This is something you could use in scripting as well as the console. In fact, I think using it in the console is an especially smart idea. In PowerShell v2 scripts and functions we…
Capture the Moment
I’m very excited that the PowerShell books I’ve been working on this year will finally begin hitting the shelves, and hopefully your desk, over next month or two. If you’ve been locked in the datacenter and have no idea what I’m talking about, you can check them out on my Books page. If you’ve already…
Friday Fun – Test PowerShell Command Name
Earlier this week I exchanged a few tweets with @jonhtyler about coming up with a proper name for a PowerShell function he was developing. The suggested best practice is to use the Verb-Noun naming convention, using an accepted verb. You can see the verbs with the Get-Verb cmdlet. So I figured why not automate this…
Hyper-V VHD Summary
When I made the move to Windows 8, one of my tasks was to migrate my test environment from VirtualBox to Hyper-V. Windows 8 includes a client Hyper-V feature that is easy to use and includes PowerShell support. Plus I needed to expand my Hyper-V skills anyway, especially from the console. After setting up a…
PowerShell Version Profile Tips
Now that PowerShell v3 is finally and officially with us, I’m trusting that many of you are embracing it. I’ve made the jump, although I have had to make some minor adjustments. If you are going to live entirely in a PowerShell v3 world, fantastic! Go forth and spread the news. But perhaps you are…
Friday Fun: Save All Open PowerShell ISE Files
Here’s a little tidbit that I previously shared on Twitter and Google Plus. The PowerShell ISE obviously has a Save menu choice. But there’s no menu option to save all open files. But you can add one yourself. All of the open files are part of the $psise.CurrentPowerShellTab.Files collection. Each item has a Save() method…
Counting Users by OU with PowerShell
I’ve been following a discussion thread in the PowerShell forum at ScriptingAnswers.com. The post is about counting the number of users in an OU. Well that sounds like fun. We got him started using the Quest AD cmdlets. I thought I’d share some of the code I posted. The test code he is posting is…
Event Log Morning Report
The Morning Report script I published earlier this yeas was quite popular. One of the changes I made in it was to skip getting event log entries to speed up the overall process. But I received an inquiry today about how to create the report with only event log information. The only way really is…
Get Total Number of Week Days
Recently I was asked about a way to calculate the number of week days between two dates. It is simple enough to get the total days by subtracting two dates and then using the resulting TimeSpan object. But what if you want to skip counting Saturday and Sunday? As far as I can tell there…
Friday Fun PowerShell Crypto
I’m a big fan of codes, ciphers and secret messages. I obviously am a big PowerShell fan as well. So why not mash these things together? Today’s Friday Fun is a PowerShell module I call PSCode. The module contains a few functions for encoding and decoding text. Now, before you get too excited, these won’t…
Fun with PSDrive Locations
A PowerShell PSDrive is a mapping between a PowerShell provider and a resource. The majority of our work is done in a file system PSDrive that corresponds to a file system drive. Let me show you a little trick that might come in handy with a PSDrive. My “trick” should apply to just about any…