Set-NetworkProfilePrivate

1.0.0

The same as Settings > Network & internet > your connection > Network profile type, or
Set-NetConnectionProfile -NetworkCategory Private, but with guard rails:

 - It shows the connections first and changes only the ones you name (or, with -AllPublic, every connection
   that is Public now).
 - It never touches a connection that is DomainAuthenticated.
 - It canno
The same as Settings > Network & internet > your connection > Network profile type, or
Set-NetConnectionProfile -NetworkCategory Private, but with guard rails:

 - It shows the connections first and changes only the ones you name (or, with -AllPublic, every connection
   that is Public now).
 - It never touches a connection that is DomainAuthenticated.
 - It cannot set "Domain": Windows grants the Domain profile only after it has reached a domain controller
   over that connection. On a domain member it refuses to set Private on a connection that looks like the
   domain network (its DNS suffix is the domain) - Private there would hide the real problem and apply the
   wrong firewall rules. Use Repair-DomainNetworkProfile.ps1 instead, or -Force if you really mean it.
 - -WhatIf shows what would change; -Confirm asks for each connection.

Choose Private only for networks you trust (home or office LAN). Hotel, cafe, airport and other shared Wi-Fi
should stay Public.

Needs an elevated PowerShell (Run as administrator).

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Set-NetworkProfilePrivate

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 Coinetic AI Security - https://coinetic.io. MIT licence.

Package Details

Author(s)

  • Coinetic AI Security - https://coinetic.io

Tags

Coinetic Windows WindowsServer NetworkProfile NetworkCategory Public Private Set-NetConnectionProfile Firewall

Dependencies

This script has no dependencies.

Release Notes

1.0.0: safe change of a network connection from Public to Private (or back) with -WhatIf; never touches Domain connections.

FileList

Version History

Version Downloads Last updated
1.0.0 (current version) 9 12/5/2026