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: $PSModuleAutoLoadingPreference and You

    This is a very simple onelner.  The problem statement is a more complicated. PSH 3 and 4 treat PSModules in a very funny way.  These versions have a default module path, and will return any cmdlet that happens to be in any module that happens to be in any directory in the default module path...
  • 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: Stupid Profile Trick: $PROFILE as Module

    I’m spending a lot of time on my $PROFILE for some reason.  Don’t tell my boss. :) Anyhow, we know that Get-Module will get you a list of modules, and Get-ChildItem Function:\ | Select-Object –Property Name, Module will show you what functions you have loaded from those modules. However, functions...
Page 1 of 1 (3 items)