powershell下怎么禁用和启用网络
1、开始菜单右键以管理员权限运行powershell。
2、执行以下命令
netsh interface show interface
查看网络连接状态。
3、执行下以下命令可以禁用网络
netsh interface set interface "以太网" disabled
4、要启用,可以执行
netsh interface set interface "以太网" enabled
5、除此之外还可以执行如下命令查看网卡绑定信息。
Get-NetAdapterBinding
6、Disable-NetAdapterBinding -Name "以太网" -DisplayName "Internet 协议版本 4 (TCP/IPv4)"
即可禁用网络。
7、要恢复网络只需要将Disable-NetAdapterBinding修改为Enable-NetAdapterBinding命令即可
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:76
阅读量:22
阅读量:183
阅读量:99
阅读量:52