-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finds a wired connection is plugged in but doesn't actually disable wired connection #3
Comments
I found the problem. If I run the following I get the following output. PS C:\WINDOWS\system32> Get-NetAdapter -Name Wi-Fi Name InterfaceDescription ifIndex Status MacAddress LinkSpeed Wi-Fi Intel(R) Wi-Fi 6 AX201 160MHz 9 Up 5C-E4-2A-14-7E-7C 400 Mbps Now it so happens that the script did the following. Therefore $WLANAdapters was blank because the description didn't match. I have now modified the script (in 2 places) to be as follows. $WLANAdapters = Get-NetAdapter -InterfaceDescription Wireless,WiFi,Wi-Fi It is actually kind of funny I am suspicious that this is actually a pure bug. Because the following comes from the psm1 file. Hence the description is NOT WiFi as in the ps1 file but actually Wi-Fi. I have a suspicion that somebody at some point made a very small mistake because as it happens if the description were WiFi the psm1 file wouldn't work. So my conclusion is this was a silly little typo or modification by somebody somewhere. I might well post my own fork which to be honest contains exactly the one change Wi-Fi instead of WiFi. If of course there is an adapter that the description is WiFi it would be better to add that to the psm1 and leave both options. I don't know if it exists of course. |
It's a powershell script which was usefulon Windows 7, on Windows 10/11
there should be a GPO function for this if your domain level is high enough.
Or if you're on a workstation computer:
http://woshub.com/disable-wi-fi-when-ethernet-cable-connected/#:~:text=Open%20the%20Network%20and%20Sharing,Enabled%20and%20save%20the%20changes
.
…On Sat, 4 Dec 2021, 21:53 nsumner42, ***@***.***> wrote:
It tries but never is able to actually disable the wired connection. This
is on a Dell OptiPlex 7090 running Windows 11. Any ideas?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD2FYRTTW2O3O5WPTS27Y3DUPJ5VVANCNFSM5JL6VQBA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
It tries but never is able to actually disable the wired connection. This is on a Dell OptiPlex 7090 running Windows 11. Any ideas?
The text was updated successfully, but these errors were encountered: