How to change the local NIC adapter on Windows 7 or greater, from Public network to Private network, using powershell:

To get NIC settings:

PS C:\windows\system32> get-netconnectionprofile
Name             :
InterfaceAlias   : vEthernet (Connexion Ethernet Intel(R) I217-LM – Virtual
InterfaceIndex   : 17
NetworkCategory  : Public
IPv4Connectivity : Internet
IPv6Connectivity : LocalNetwork

To change the NIC settings to be in private mode:

PS C:\windows\system32> set-netconnectionprofile -InterfaceIndex 17 -NetworkCategory Private