Comparing version numbers – Part II

Today I’d like to share a function for comparing semantic version numbers in PowerShell. To recap: Software developers should use a logical versioning style to better manage dependencies and to just make their releases and cycles well understandable. There is some kind of a specification out there. I’m not sure how “official” this is but … Read more

Comparing version numbers

If you’re using PowerShell, you most probably came across the following issue: Comparing version numbers just doesn’t work if they are stored in strings. The simple case Example: $a = “1.1.19” $b = “1.1.2” if ($a -gt $b) { Write-Host “$a is greater than $b” } else { Write-Host “$a is less than $b” } … Read more

Simple log function

Today I’d like to share a simple PowerShell log function. This is one of my first posh scripts I customized. Originally it’s not from me, I just made it prettier and added the color. I know there are functions out there that create great logs for cmtrace.exe, but at the moment I’m happy with this one. … Read more