You can use PowerShell command to change network settings from public to private: Run PS as administrater
- Get-NetConnectionProfile and press Enter. Information is then shown about the active network connection.
- Set-NetConnectionProfile -Name “NetworkName” -NetworkCategory Private. Replace NetworkName with the value of the Name field shared by the previous command.
To double check that the network location was changed, run the Get-NetConnectionProfile again and see the results. The NetworkCategory field should have a different value.

- You can open sharing options for different network profiles in Control Panel> Network and sharing center> Advanced sharing settings
