# Get - IPAddress2.ps1 # Parses an address, returns a System.NET.IPAddress if OK # Uses tryparse (and therefore works with PSH v1) # Thomas Lee - tfl@psp.co.uk $strings = " 10.1.1.100 " , " 10.1 " , " fooey " foreach ( $ string in $strings){ " Testing: ` " { 0 }` "" - f $ string $address = [System.Net.IPAddress]::tryparse($ string ,[ ref ] $ip1) if
Read More...
Read the complete post at http://pshscripts.blogspot.com/2008/12/get-ipaddress2ps1.html
Posted
Dec 04 2008, 11:25 AM
by
PowerShell Scripts