Powershell NSLOOKUP
The following PowerShell one liners give you hostname to IP or vice versa.
Posted on August 18, 2012 at 11:17 by simon · Permalink
· Leave a comment
In: Power Shell · Tagged with: dns, hostname, ip address, nslookup, PowerShell
In: Power Shell · Tagged with: dns, hostname, ip address, nslookup, PowerShell
Validate an IP address in PowerShell
Today I needed to validate an IP address after a user types it in to a script. I don’t want to ping or check connectivity, I just want to validate that the format looks like a valid IP address. I looked at various regex expressions which were getting complicated. Then I stumbled upon this little nugget:
Posted on August 17, 2012 at 19:57 by simon · Permalink
· One Comment
In: Power Shell · Tagged with: .NET, ip address, validate
In: Power Shell · Tagged with: .NET, ip address, validate