4

没有设置时如何创建新的“Windows 位置”设置?

一段时间以来,我的 Win10 Pro 系统一直使用非常好的以太网堆栈运行,但没有设置“网络位置”,这意味着某些服务无法正常工作(或根本无法正常工作),因为 Windows 本质上是在“公共”中运行模式,它会禁用它们。

我已经尝试了多轮禁用/删除驱动程序,重置或删除注册表项等等。我最近看到了这篇文章,里面有一些新信息。所以我现在知道了:

在 Elevated PowerShell 中,Get-NetConnectionProfile 不返回任何内容 - 根本没有条目。在同一窗口中使用 ipconfig 会返回预期的信息:

PS C:\WINDOWS\system32> ipconfig

Windows IP Configuration
Ethernet adapter Ethernet:
   Connection-specific DNS Suffix  . : ivimey.org
   IPv4 Address. . . . . . . . . . . : 192.168.43.14
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.43.1

所以我尝试使用 Set-NetConnectionProfile:

PS C:\WINDOWS\system32> Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory Private
Set-NetConnectionProfile : No MSFT_NetConnectionProfile objects found with property 'InterfaceAlias' equal to 'Ethernet'.  Verify the value of the property and retry.
At line:1 char:1
+ Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory Pr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Ethernet:String) [Set-NetConnectionProfile], CimJobException
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_InterfaceAlias,Set-NetConnectionProfile

我也尝试使用 -Name 而不是 -InterfaceAlias 获得相同的结果。

有任何想法吗?

4

0 回答 0