问题原文
原帖链接 · vgru · CC BY-SA 3.0
After a restart of one of our servers (a Windows Server 2012 R2), all private connections become public and vice versa (this user had the same problem). Stuff like pinging and iSCSI stopped working, and after some investigation it turned out this was the cause.
The problem is that I don't know how to make them private again. Left-clicking the network icon in the tray shows the "modern" sidebar, but it only shows a list of connections, and right-clicking them doesn't show any options.
What could be the problem, and is there a way to change these settings? I have to make one of the connections public (Internet access), and two of them private (backbone).
已采纳解答
原帖链接 · Ryan Ries · CC BY-SA 4.0
Powershell. Here is an example of changing the network profile of a network interface called Ethernet1 from whatever it is now to "Private." I got this info from Get-Help Set-NetConnectionProfile -Full.
PS C:\>$Profile = Get-NetConnectionProfile -InterfaceAlias Ethernet1
PS C:\>$Profile.NetworkCategory = "Private"
PS C:\>Set-NetConnectionProfile -InputObject $Profile
Documentation: https://docs.microsoft.com/en-us/powershell/module/netconnection/set-netconnectionprofile?view=winserver2012r2-ps
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
