terse 当前离线
中将
$ip=Read-Host "请输入要查询的IP:默认空为本机" if($ip){$pip="queryip"} else {$pip="getip"} $url ="http://www.ip.cn/getip.php?action=$pip&ip_url=$ip" [void]((new-object system.net.webclient).downloadstring($url) -match '<p>\s*(?<Mode>[^<]*).*?(?<ip>[(\d{1,3}\.){3}\d{1,3}]+)[\s<].+?[^<]+[>|;]\s*(?<City>[^<]*)') Write-Host -ForegroundColor Yellow $Matches.Mode $Matches.ip $Matches.City cmd /c "pause>nul"复制代码
PowerShell (powershell传教士)当前离线
上尉
TOP
DAIC 当前离线