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
coming soon....Sponsored Links
Category Archives: Best Practices
Filter Left
When writing WMI queries expressions in Windows PowerShell, it is recommended to use WMI filtering, as opposed to getting objects and then filtering with Where-Object. I see expressions like this quite often: get-wmiobject win32_process -computer $c | where {$_.name -eq … Continue reading
Posted in Best Practices, Google Plus, PowerShell, WMI
Tagged filtering, PowerShell, WMI
Leave a comment
Verbose or Debug?
This morning there was some discussion on Twitter about when to use Write-Verbose and when to use Write-Debug. They both can provide additional information about what your script or function is doing, although you have to write the code. Typically, … Continue reading
Posted in Best Practices, PowerShell v2.0, SAPIEN, Scripting
Tagged Debug, PowerShell, Primalscript, Scripitng, Verbose, Write-Debug, Write-Verbose
8 Comments
Filtering Empty Values in PowerShell
I saw this tip today and wanted to leave a comment but couldn’t see how. So I thought I’d post my comments here. This is actually a question I see often and there are better ways to write this kind … Continue reading
Posted in Best Practices, PowerShell, Scripting
Tagged filtering, PowerShell, Scripting, Where-Object
20 Comments
ByValue, I Think He’s Got It
Recently I responded to an email from a student seeking clarification about the difference between ByValue and ByProperty when it comes to parameter binding. This is what makes pipelined expressions work in Windows PowerShell. When you look at cmdlet help, … Continue reading
Posted in Best Practices, PowerShell
Tagged Get-Content, Get-Service, parameter, Pipeline, PowerShell, Select-Object
1 Comment
Creating ACL Reports
I saw a tweet this morning that was a PowerShell one-liner for capturing folder permissions to a text file. There’s nothing wrong with it but it’s hard to be truly productive in 140 characters so I thought I would take … Continue reading
Posted in Best Practices, PowerShell v2.0, Scripting
Tagged Export-Clixml, Get-ACL, Out-File, PowerShell, Scripting, xml
5 Comments



