Powershell Tricks And Simple Problems With Regex -matches

I wasted almost two hours on this today. The goal was simply to create a function to pull out a 5 digit zip code from a string. Three Powershell lessons learned : 1) using -match will return an additional $true/$false from a function unless you “swallow” the value into a variable.  http://stackoverflow.com/questions/27193956/extracting-data-from-the-matches-hashtable-after-a-powershell-regeg-match 2) return doesn’t […]

Powershell Script (Scheduled Task) to Monitor Windows Services

Powershell Code: # # LUNAR DUST – home grown server/service monitor – sends out email when services defined in related .CSV config file are down # Author: Neal Walters – Nov 2013 # (Lunar Dust is a play on words of the monitor name "Solar Wind") # [string[]] $users = "john@abc.com",'"fred@abc.com" # List of users […]