Jump to content

Shutting down NICs


lurk&jerk

Recommended Posts

Anybody know if the command: 

C:\Windows\System32\wbem\WMIC.exe path win32_networkadapter where PhysicalAdapter=True call disable

no longer works in Window3s 11?  I had used it in Windows 10 to prevent MS from surreptitiously updating the OS or sending telemetry info

back to Redmond during bootup or shutdown, before my firewall started. But now that commend leaves some NICs disabled and some still operating.

Edited by lurk&jerk
Link to comment
Share on other sites


[SOLVED]

Found that Powershell works better, in case anyone is interested:

powershell -c "Get-NetAdapter | Disable-NetAdapter -Confirm:$false"

Put it in a batch or command script and you are good to go. Still wrestling with AutoIt, though. Powershell and AutoIt don't play nice together,, unfortunately :(

Edited by lurk&jerk
[SOLVED]
Link to comment
Share on other sites

  • 2 weeks later...

Sooooooo, after further experimenting, my original script or the powershell script works BUT the issue is that Windows 11 apparently shuts down NICs in a different manner than Windows 10. In Windows 11 the "Disable-NetAdapter" command disables only the primary active NIC. In Windows 10, all NIC adaptors are immediately disabled. Also, in Windows 11, the disabled NIC can't be re-enabled without a re-boot, at least withi my QLogic Corp. sfp adaptor. I have to restart my  PC. I don't have to do that With Windows 10. That makes the disable adaptor command much less useful for me. It's a lot easier just to unplug and re-plug the cable from the wall plate instead of rebooting. 

Link to comment
Share on other sites

Maybe you need to use devcon (no idea if it works on 10 or 11), on older systems it was the only tool capable of re-starting some devices without reboot:

https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/devcon-examples

We have a copy re-compiled from the original MS source code here:

but possibly you will need a neer version from the WDK:

https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/devcon#

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...