Windows: Get, set or change the network access type or network category

Hi,

to get and the network access type and the network category use the powershell commandlets Get-NetConnectionProfile and Set-NetConnectionProfile.

PS D:\> Get-NetConnectionProfile
Name             : Network
InterfaceAlias   : Ethernet0
InterfaceIndex   : 6
NetworkCategory  : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : NoTraffic

And set the interface from public to private

PS D:\> Set-NetConnectionProfile -Name Network -NetworkCategory Private
PS D:\> Get-NetConnectionProfile
Name             : Network
InterfaceAlias   : Ethernet0
InterfaceIndex   : 6
NetworkCategory  : Private
IPv4Connectivity : LocalNetwork
IPv6Connectivity : NoTraffic

Michael

Leave a Reply Cancel reply