Hi guys,
I have a problem with this script here
for /f "tokens=3" %%a in ('netsh interface ip show config ^| find /i "DHCP Enabled"') do set DHCP=%%a
If /i "%dhcp%" == "Yes" (
REM do command here
) Else (
REM script to backup DNS servers to environment variables
)
I've tried numerous ways using the first for /f example to try and get the DNS Server entries into environmental variables to be used later.
So basically I'm lookin' for a way to backup the dns server/s to environement variable/s (primary/secondary dns) if DHCP is disabled.
Thanks and God Bless,
Merry Xmas and Happy New Year
John