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: Do-Something | Set-Variable Foo

    Especially for stuff that generates a lot of output, I’ve learned to pipe commands to Set-Variable. It’s no different than starting the command with “$foo =”, such as $foo = Do-Something, However, I like ‘building’ a command pipeline on the command line, adding a new...
  • Blog Post: Adding a Timestamp to a Pipeline of Strings

    If I'm doing something long-running, and I want it to know when various lines of output are generated, assuming they are being sent to STDOUT (something PSH is NOT good at), here's a quick way to preface the output with a timestamp. -Format allows us to pass a formatting parameter to Get-Date. ...
Page 1 of 1 (2 items)