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

Advertisment to support michlstechblog.info

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.