From Newsgroup: alt.comp.os.windows-11
I was remoted into a customer and did something stupid.
What did I do??? I ain't tellin'! í ½í¸�
Needless to say, I had to coach the customer over the
phone through a full network reset:
<Network.Reset.Full.Nuke.txt>
Windows 10/11 Full Network Reset:
GUI:
Click Start
--> Settings.
--> Network & Internet.
Windows 11: Click Advanced network settings → Network reset.
Windows 10: Click Status → Network reset.
--> Click Reset now.
--> Confirm Yes if prompted.
The PC will restart automatically (or do a manual restart).
Admin CMD:
netsh int ip reset
netsh winsock reset
ipconfig /flushdns
shutdown /r /f /t 00
Note: Save any open work before running the final command;
/f force-closes applications.
</Network.Reset.Full.Nuke.txt>
HTH someone else,
-T
Whenever I screw up the network, I run this to reset Wi-Fi/Ethernet.
@echo off
REM This is v1p6 of C:\data\sys\batch\netconnect.bat
REM Resets Wi-Fi to a consistent state after unexpected loss
REM v1p0 20251029
REM elevates to admin
REM toggles Wi-Fi to put it into a consistent state after reboot
REM then connects to a given named SSID
REM v1p1 20251101
REM added conditional checks and retries
REM v1p2 20251102
REM added loop to verify State/SSID and retry until truly connected
REM v1p3 20251213
REM added immediate Wi-Fi environment scan after successful connection
REM v1p4 20251213
REM outputs and overwrites log of the wrong name (no timestamp)
REM in the wrong directory (it should be in the log directory!)
REM v1p5 20251213
REM outputs timestamped log file in the log directory
REM v1p6 20251213
REM WIP added logging of nearby cached access points after connection
:: --- Elevate to admin if not already ---
>nul 2>&1 net session
if %errorlevel% neq 0 (
echo Requesting administrative privileges...
powershell -Command "Start-Process '%~f0' -Verb RunAs"
exit /b
)
:: Use "netsh interface show interface" to get adapter name
set adapter=Wi-Fi
:: Assumption is that the ssid:password has already been saved
set ssid=nordstrom.office_nomap
:: The saved SSID profile is used for credentials.
echo [%date% %time%] Toggling Wi-Fi adapter...
netsh interface show interface name=%adapter%
REM Disable the adapter (to set to a consistent state)
netsh interface set interface name=%adapter% admin=disable
timeout /t 5 >nul
REM Enable the adapter (to set to the desired state)
netsh interface set interface name=%adapter% admin=enable
timeout /t 10 >nul
echo Attempting to connect to %ssid%...
REM Connect to the specified SSID after adapter is fully enabled
powershell -Command "Enable-NetAdapter -Name '%adapter%' -Confirm:$false"
timeout /t 5 >nul
REM Added loop to verify State/SSID and retry until truly connected
set retries=3
:retry
echo Connecting to %ssid%...
netsh wlan connect name=%ssid%
timeout /t 5 >nul
for /f "tokens=2 delims=:" %%A in ('netsh wlan show interfaces ^| findstr /C:"State"') do (
set state=%%A
)
for /f "tokens=2 delims=:" %%A in ('netsh wlan show interfaces ^| findstr /C:"SSID" ^| findstr /V "BSSID"') do (
set currentSSID=%%A
)
set "state=%state: =%"
set "currentSSID=%currentSSID: =%"
REM Define log directory and ensure it exists
set "logdir=C:\data\sys\log"
if not exist "%logdir%" mkdir "%logdir%"
REM Build timestamp for filename using WMIC (locale-independent)
for /f %%A in ('wmic os get localdatetime ^| find "."') do set dt=%%A
set "ts=%dt:~0,8%_%dt:~8,6%"
REM Define logfile path with timestamp
set "logfile=%logdir%\wifiscan_%ts%.log"
REM Always create logfile entry, regardless of connection state
echo === Run at %date% %time% === >> "%logfile%"
echo Target SSID: %ssid% >> "%logfile%"
echo State=[%state%] CurrentSSID=[%currentSSID%] >> "%logfile%"
if /I "%state: =%"=="connected" (
echo Connected (state=connected). Target SSID: %ssid%
>> "%logfile%" echo Nearby Wi-Fi environment after connect:
netsh wlan show networks mode=bssid >> "%logfile%"
echo Wi-Fi environment snapshot saved to %logfile%
goto done
) else (
set /a retries-=1
if %retries% gtr 0 (
echo Not connected yet. Retrying...
timeout /t 5 >nul
goto retry
) else (
echo Connection failed after multiple attempts.
>> "%logfile%" echo Connection failed after multiple attempts.
)
)
:done
echo [%date% %time%] Done. Check your connection status.
echo Final adapter status:
netsh interface show interface name=%adapter%
netsh wlan show interfaces
REM Show the log contents in the console
type "%logfile%"
REM Open the log file with the default associated editor (gVim in your setup)
start "" "%logfile%"
pause
:: end of C:\data\sys\batch\netconnect.bat
--- Synchronet 3.21d-Linux NewsLink 1.2