Get-IPAddress.ps1

# Requires -Version 2.0 # Get-IPAddress.ps1 # Parses an address, returns a System.NET.IPAddress if OK # Thomas Lee - tfl@psp.co.uk $strings = " 10.1.1.100 " , " 10.1 " , " fooey " foreach ( $string in $strings ){ try { $address = [System.Net.IPAddress] :: parse( $string ) " `"{0}`" `tis a valid IP address " -f $address .IPaddressToString } catch { " Read More...

Read the complete post at http://pshscripts.blogspot.com/2008/12/get-ipaddressps1.html


Posted Dec 03 2008, 10:50 AM by PowerShell Scripts
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.