Created
July 16, 2012 14:54
-
-
Save sunnyc7/3123149 to your computer and use it in GitHub Desktop.
Reverse an IP in Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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