从命令行将当前网络切换到“家庭”模式

Aco*_*orn 7 networking windows windows-7

有没有办法从命令行在家庭、公共和工作模式之间切换?

Nix*_*hoe 1

尝试使用netsh。下面是一些例子。您想将配置转储到文件中

netsh -c interface dump > c:'location1.txt
Run Code Online (Sandbox Code Playgroud)

然后根据您所在的位置导入它。

netsh -f c:'location1.txt
Run Code Online (Sandbox Code Playgroud)

  • 转储的设置似乎没有提及网络类型设置,我是否遗漏了什么? (2认同)