Validate an IP address in PowerShell

Today I needed to validate an IP address after a user types it in to a script.  I don’t want to ping or check connectivity, I just want to validate that the format looks like a valid IP address.  I looked at various regex expressions which were getting complicated.  Then I stumbled upon this little nugget:

Posted on August 17, 2012 at 19:57 by simon · Permalink · One Comment
In: Power Shell · Tagged with: , ,