Private/TestIsValidIPAddress.ps1
function TestIsValidIPAddress([string]$IPAddress) { [boolean]$Octets = (($IPAddress.Split(".") | Measure-Object).Count -eq 4) [boolean]$Valid = ($IPAddress -as [ipaddress]) -as [boolean] Return ($Valid -and $Octets) } |