Powershell to check IP Address format

This one regex check will validate if the string is formatted to be an IP address, but it won’t actually validate the octets.  It’s still useful.

If (($IPAddress -match "\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}") -and ($IPAddress [$IPAddress .Length -1] -match "\d")) {"This is formatted like an IP Address."}