Changing Network Connection Mode from Private to Public (and vice versa)

by Oct 6, 2017

Starting with Windows Server 2012 R2 and Windows 8.1, PowerShell ships with many useful cmdlets for client and server configuration. This comes handy as some settings can no longer be controlled via UI.

For example, to change the network type of your network, simply run this code with Administrator privileges:

 
PS> Get-NetConnectionProfile


Name             : internet-cafe
InterfaceAlias   : WiFi
InterfaceIndex   : 13
NetworkCategory  : Private
IPv4Connectivity : Internet
IPv6Connectivity : Internet




PS> Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Public -WhatIf
What if: 

Twitter This Tip! ReTweet this Tip!