Lessons Learned

My drop-site for interesting snippets and tips. If it's useful to you as well, great!

Browse by Tags

Tagged Content List
  • Blog Post: Scripting Best Practices, or Write-Host Considered Harmful

    Disclaimer: this is going to sound like I actually know what I’m doing.  Let’s be honest – I work in Microsoft, home to the people who created PSH, .NET, and the native internals that people invoke with Add-Type and other arcane arts.  There’s no way I can say I know what I’m doing relative...
  • Blog Post: Capturing Write-Noun Cmdlet Output

    I’m sure there’s a cleaner way to capture the output from Write-Host, Write-Verbose, etc.  However, I’m just going to “go caveman” in the words of a coworker and just hack around with the Verb-Transcript cmdlets. Without further ado: function Get-MisbehavingCmdletOutput { param ( [System.Management...
Page 1 of 1 (2 items)