I work in a university/college and having a problem in one of the labs.

At the moment we have a few programs that pull their licences from a licence server. This licence server has no internet connection to aid with security and is networked to these 16 or so computers via a wired LAN. To access the internet we installed wireless cards and connected them all to another server that has shared resources the students will need access to from time to time.

Now, i've had to set it up with deepfreeze so that when they log on the wLAN is enabled and LAN is disabled (as internet access is prioritised), but if they need to use one of 3 apps they must first disable the wireless card, then enable the lan connection, and then start the program after waiting to obtain an ip address for the licence network. They then have to reverse the process once the program has loaded so they can continue using the internet.

My question is, is there any kind of script i can write to at least semi automate this process? Was thinking of maybe having 3 shortcuts on the desktop for the progroms that were in fact scripts that did the network changes, ran the progam and then after a wait of say 30 seconds revert the network changes.

If anyone has any advice that can point me in the right direction i'd appreciate it.



  • 1
    Why not leave both adapters enabled, but use a static route for the licensing server? Seems much simpler. – Jim G. Jan 14 '15 at 0:31
  • My suggestion is to have the licensing server, as well as the adapters of the systems that need to access it belong to their own network in private space. The private IP addresses will keep the Internet from reaching the licensing server. Not setting a default gateway on the licensing server will restrict its traffic to the directly connected IP network. The workstations adapters that connect to the Internet can be configured normally. Static routes are not needed, because the workstations will have an adapter that is on the same network as the lic. server. – Nevin Williams Jan 14 '15 at 4:35

Just use Powershell and the Network Adapter Cmdlets. With those you can easily change the settings, enable and disable the adapters.


Edit: Forgot this is PowerShell v4. I'd use WMI Objects just to be safer if you're environment has multiple OSs, etc.

$Ethernet = Get-WmiObject -Class Win32_NetworkAdapter -Filter "Name = '$EthernetAdapterName'"
$Wireless = Get-WmiObject -Class Win32_NetworkAdapter -Filter "Name = '$WirelessAdapterName'"
Start-Sleep 30
  • External links are good for reference, but you should include a sample script so that this site is not relying on the existence of another. – Patrick Seymour Jan 14 '15 at 0:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.