< # .SYNOPSIS This script checks whether a parameter is an IPv6 or IPv4 Loopback Address .DESCRIPTION This script checks to see if the passsed string is a loopback address and if so, displays details. .NOTES ...
# Send-UDPDatagram # Sends a UDP datagram to a port # Thomas Lee - tfl@psp.co.uk # Made up for this example [int] $port = 20000 $address = [system.net.IPAddress] :: Parse( " 10.10.1.100 " ) # Create IP Endpoint $end = new - object system.net.IPEndPoint $address , $port # Create Socket $saddrf...
# 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...
# 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...