I needed to change the firewall profile for a network adapter from public to private in windows server 2012. The only way I could work out to do it was using the following registry edit:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\{}
The value of Category is set as follows for the firewall profile:
Public = 0
Private = 1
Domain = 2
You need to match the detected network setting with the ProfileName key under the GUID, and modify the Category value as required.