Get-NetConnectionProfile
Set-NetConnectionProfile -InterfaceIndex <InterfaceIndex> -NetworkCategory Private
Set-NetConnectionProfile -InterfaceIndex 16 -NetworkCategory Private
Get-NetConnectionProfile
To change a network from Public to Private you can use several methods. Since the graphical interface in Server editions doesn’t always provide this option, PowerShell is often the most straightforward approach.
🔧 Using PowerShell
- Open PowerShell as Administrator:
- Right-click the Start button and select Windows PowerShell (Admin).
- Identify the Network Interface:
Get-NetConnectionProfile
- This command lists all network interfaces and their current profiles.
- Change the Network Category:Replace <InterfaceIndex> with the actual index number of your network adapter.
Set-NetConnectionProfile -InterfaceIndex <InterfaceIndex> -NetworkCategory Private
- For example, if your interface index is 8:
Set-NetConnectionProfile -InterfaceIndex 8 -NetworkCategory Private
- Verify the Change:
Get-NetConnectionProfile
- Ensure that the NetworkCategory is now set to Private.