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: PowerShell for N00bs: Libraries, Paths, and You

    One of the scripts a coworker inherited has the following workflow: 1. Set-Location $PathContainingScript 2. & $Script Why?  Because the original author was a believer in libraries.  Or, specifically, TheMotherOfAllLibraries.ps1.  Divide the library into ones for AD, one for host management...
  • Blog Post: PowerShell One-Liner: What's the Function Name?

    Rather than have to put the function's name in the error mesage (and then forgetting to change it when I copy/paste/rename/modify it), here's a quick function that I can embed in the error message to spit out the function's name: function Get-FunctionName { ( Get-Variable MyInvocation -Scope 1).Value...
Page 1 of 1 (2 items)