About Me

I am certified Microsoft professional, a Microsoft MVP and an IT veteran with almost 20 years of experience, much of it spent as an IT consultant specializing in Windows server technologies. I work today as an independent author, trainer and consultant. I've co-authored or authored several books, courseware, and training videos on administrative scripting and automation. My latest book is Managing Active Directory with Windows PowerShel: TFM 2nd Ed.(SAPIEN Press 2011).
-
Please consider a donation if I've been of any help or assistance. Thank you.
Blog Sponsors
Category Archives: Friday Fun
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 Get-Content, PowerShell, regex, Regular Expressions, Scripting, Select-Object
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 FridayFun, Jobs, PowerShell, Start-Job
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 FridayFun, Function, PowerShell, Tee-Object, Write-Host
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 FridayFun, Get-variable, objects, PowerShell, Type, Variable
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 console, PowerShell, Read-Host, switch
11 Comments



