I have this code in PowerShell and it does not work! any help?
I just need it to make sure that the string is a working IP not 999.999.999.999 or a normal string
just an IP [0....255].[0....255].[0....255].[0....255]
if ($newIP -match "(\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)") { $x = $True}
cheers