Skip to content

Instantly share code, notes, and snippets.

@sunnyc7
Created July 16, 2012 14:54
Show Gist options
  • Save sunnyc7/3123149 to your computer and use it in GitHub Desktop.
Save sunnyc7/3123149 to your computer and use it in GitHub Desktop.
Reverse an IP in Powershell
## string reverse
## You can replace the IP with a variable which you get from a variable, or read from nslookup
$ip = "192.168.1.10"
$reverseIP = ($ip.split("."))[3..0]
$newIP = [string]::join(".",$reverseIP)
$newIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment