Set Windows network type public private using powershell

List all network interfaces/profiles: Get-NetConnectionProfile

Find the InterfaceIndex number of the adapter you wish to change, then use the command:

Set-NetConnectionProfile -InterfaceIndex <index number> -NetworkCategory Private