首页 > 代码库 > loop_nslookup

loop_nslookup

 1 function loop_nslookup() { 2     $baseFolder = "D:\ps_toolkit" 3     $ip_list = "$baseFolder\ip_list.txt" 4     $cmd = "C:\Windows\System32\nslookup.exe" 5     $reader = [System.IO.File]::OpenText($ip_list) 6     $reader.GetType() 7     while($null -ne ($line = $reader.ReadLine())) { 8         $arg1 = $line.Trim() 9         if("".Equals($arg1) -or $arg1.StartsWith("#")){10             continue11         }12         & $cmd $arg113         #write-host "[$cmd] - [$arg1]"14         write-host "====="15     }16     $reader.Close()17 }

 

loop_nslookup