# Lessons Learned

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

# January, 2014

Posts
• #### Getting Version Data From Comment Based Help

Disclaimer: There’s a lot of parse-by-prayer here. You Have Been Warned. Here’s the short form: I try to keep a change log of sorts in the comment-based help for my scripts. (I say try because that’s sadly the first thing to be omitted...
• #### Testing Timestamps of Files Across a Slow Network

I’m not sure if this is because of network lag, or the fact that my lab is on a different AD domain (and different NTP clock) than my local computer.  All I know is: (Get-Item local\path\to\OriginalFile.txt).LastWriteTime –eq (Get-Item remote\path...
• #### Loop-de-Loop

Here’s a quick trivia question for you: Given the following two looping constructs: foreach ($item in$array) { Do-Something -With $i; } and for ($i = 0; $i -lt$array.Count; $i++) { Do-Something -With$i; } What's the difference? ...