This is two separate scripts!! The first will disable your wireless network connection. The second will enable it. Use these by creating 2 tasks in task scheduler to automatically disable wireless when docked (or NIC plugged in) and to enable wireless when undocked (or unplugged).
How to Enable Wifi Before Domain Logon in Windows Under profile of the wireless network properties, security tab, "advanced settings"->"Enable single sign on for this network", and choose "Perform immediately before user logon". The computer will now log on as any user with wireless authentication. Might help those who don't want to go through GPO or have multiple WLAN configurations. How to Fix Limited or No Connectivity Errors in Windows Mar 27, 2020 Auto Connect to WiFi access points – Marc Kean
Jan 16, 2017
Oct 25, 2016
To connect your portable or desktop PC to your wireless network, the PC must have a wireless network adapter. Most laptops and tablets—and some desktop PCs—come with a wireless network adapter already installed. To check whether your PC has a wireless network adapter: Select the Start button, type device manager in the search box, and then
To connect your portable or desktop PC to your wireless network, the PC must have a wireless network adapter. Most laptops and tablets—and some desktop PCs—come with a wireless network adapter already installed. To check whether your PC has a wireless network adapter: Select the Start button, type device manager in the search box, and then