Use below PowerShell commands
Get the list of network profile
Change the network interface to private or Public
Get the list of network profile
Get-NetConnectionProfile
Set-NetConnectionProfile -InterfaceIndex <IndexNumber> -NetworkCategory <Private/Public>
Example
PS C:\> Get-NetConnectionProfile
Name : Network
InterfaceAlias : Ethernet
InterfaceIndex : 12
NetworkCategory : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : NoTraffic
PS C:\> Get-NetConnectionProfile -InterfaceIndex 12 -NetworkCategory Private
Name : Network
InterfaceAlias : Ethernet
InterfaceIndex : 12
NetworkCategory : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : NoTraffic
PS C:\> Get-NetConnectionProfile -InterfaceIndex 12 -NetworkCategory Private
No comments:
Post a Comment