我不能轉換以下for循環表:CONVER的for循環的結果表
for ($i=1; $i -le 10; $i++)
{
$ErrorActionPreference= 'silentlycontinue'
Write-Progress -PercentComplete ((100*$i)/255) -Activity "Gathering IP's"
nslookup("192.168.2." + $i) | Format-Table
}
出現這種情況的唯一的事情是,每ADRESS是不可達的,它顯示了路由器名稱/ IP:
Server: easy.box.local
Address: 192.168.2.1
Name: easy.box.local
Address: 192.168.2.1
Server: easy.box.local
Address: 192.168.2.1
我要像一個表對其進行排序,使之更加方便易多的可視
對於不同方法,請嘗試「Get-NetIPAddress -IPAddress 192.168.2。* | Format-Table」 –