Skip to content

Instantly share code, notes, and snippets.

@RIKIKU
Created September 6, 2017 03:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
$servers = "8.8.8.8", "8.8.4.4"
foreach($server in $servers)
{
@"
?
google.com {0}
"@ -f $server | out-file "C:\Users\kyles\Desktop\in.txt" -Encoding utf8 -Force
Start-Process nslookup -RedirectStandardInput "$env:USERPROFILE\Desktop\in.txt" -RedirectStandardOutput "$env:USERPROFILE\Desktop\out$server.txt" -Wait
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment