Created
August 20, 2019 05:27
-
-
Save Serat00l951/a15694cfd6a2b33eb7912080e2bd6993 to your computer and use it in GitHub Desktop.
Switch the network adapter status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$adapter_name="Ethernet" | |
if ((Get-NetAdapter $adapter_name).InterfaceOperationalStatus -eq $true) {Disable-NetAdapter -Name $adapter_name -Confirm:$false} else {Enable-NetAdapter -Name $adapter_name -Confirm:$false} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment