Category Archives: Friday Fun

Fun ways to use PowerShell yet still learn a thing or two.

Friday Fun Get Content Words

Recently I was tracking down a bug in script for a client. The problem turned out to be a simple typo. I could have easily avoided that by using Set-StrictMode, which I do now, but that’s not what this is … Continue reading

Posted in Friday Fun, PowerShell v2.0, Scripting | Tagged , , , , , | Leave a comment

Friday Fun: A PowerShell Alarm Clock

Today’s Friday Fun is a continuation of my exploration of ways to use Start-Job. A few weeks ago I wrote about using Start-Job to create “scheduled” tasks. I realized I could take this further and turn this into a sort … Continue reading

Posted in Friday Fun, PowerShell, PowerShell v2.0 | Tagged , , , | Leave a comment

Friday Fun: Output to 2 Places in 1

Today’s Friday Fun comes out of a short exchange I had yesterday with Hal Rottenberg on Google Plus. We were playing around with piping a PowerShell command to Clip.exe which dumps the output to the Windows Clipboard. I got to … Continue reading

Posted in Friday Fun, PowerShell v2.0 | Tagged , , , , | Leave a comment

Friday Fun What’s My Variable

I use scriptblocks quite a bit in my PowerShell work, often saved as variables. These are handy for commands you want to run again, but don’t necessarily need to turn into permanent functions. $freec={(get-wmiobject win32_logicaldisk -filter "deviceid=’c:’" -property Freespace).FreeSpace/1mb} Now … Continue reading

Posted in Friday Fun, PowerShell | Tagged , , , , , | Leave a comment

Friday Fun – A PowerShell Console Menu

When working in PowerShell, and especially when scripting, you might want to give the user a choice of actions. For example, you might develop a configuration script that another admin or technician will run. Perhaps one of the steps is … Continue reading

Posted in Friday Fun, PowerShell v2.0, Scripting | Tagged , , , | 11 Comments