不知是否符合您的需求- @echo off&setlocal enabledelayedexpansion
- for /f "tokens=1,2* delims=={}" %%a in ('wmic nicconfig where "ipenabled=true" get dnsserversearchorder /value 2^>nul') do (
- if /i "%%a"=="dnsserversearchorder" set "dns=%%b"&echo.DNS Service: !dns!
- )
- pause >nul
复制代码
|