Newsletter

Change Network Type to Private in Windows 8.1 & Windows Server 2012 R2

Scroll down
Fred Lackey
Fred Lackey
Expert:
  • Location
    Atlanta, Georgia
  • Experience
    40+ Years

2015-09-25

6:15 AM

fredlackey

This is one of the most annoying issues in Windows these days.  If you’re comfortable with PowerShell, changing the network type from “Public” to “Private” in Windows 8.1 and Windows Server 2012 R2 is relatively easy.

First, you will need to be an an elevated PowerShell session.  You can get there by right-clicking on the PowerShell icon, and selecting “Run as Administrator.”  However, if you are already in a non-elevated PowerShell session, you can spawn an elevated session using the following command:

Start-Process WindowsPowerShell.exe -verb RunAs

Next, we need to identify the network InterfaceIndex.  Let’s issue the command:

PSH> Get-NetConnectionProfile
…[snip]...
Name : Unidentified network
InterfaceAlias : vEthernet (Local-10)
InterfaceIndex : 18
NetworkCategory : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : LocalNetwork

In this example, the interface has an index of 18.  To elevate this specific network to Private…

Set-NetConnectionProfile -InterfaceIndex 18 -NetworkCategory Private

That’s about it.  I hope this helps someone.

author avatar
fredlackey
Posted in Helpful Info
Write a comment
© 2024 Fred Lackey, All Rights Reserved.
Write me a message

    Messages and contact info remain private at all times.