Allow us to hard set network location profile
Network Location Awareness is very useful feature on desktops. Particularly in the current climate of people taking machines home, having them detect "Public" networks is useful.
However, it is nearly unheard of for a Windows Server to be picked up and taken to an untrusted network. Instead of the benefits of this feature, there are many reasons wherein a server may decide it's in a public network and firewall itself from access. This will, for example, prevent a file server sharing files, or an Exchange server accepting email. If this occurs to Domain Controllers, it will trigger all other servers to consider themselves on a public network and generate effectively an "all servers down" scenario.
A Google search for "network location awareness" leads to no discussion about the feature, and pages and pages of workarounds for a problem that is clearly quite common.
There is a commonly described workaround involving restarting, or delaying the start of the Network Location Awareness service. But thinking about this logically, it's a "workaround" to a problem that should not occur.
This is particularly relevant to a Server Core installation that would never be taken home for use as a desktop, and can be quite difficult to troubleshoot without a UI.
If a Powershell command or registry edit would allow us to just set a server to "always use domain profile", we could improve resilience and remove these sort of issues from occurring, whilst avoiding workarounds of dubious quality.
Afshin Babazadeh Gh commented
Ok, allow it please!
I used to have issues with this as well. However, I use a desktop environment since I couldn't find resources how to learn Windows CLI and decided to go Linux/FreeBSD. If you can manage it remotely with Microsoft Management Console (MMC), then -
Use the "Group Policy Object" snap-in. Then go "Computer Configuration>Windows Settings>Security Settings>Network List Manager Policies" > open your network name's properties (e.g. "Network" (default name in my network connections)) > "Network Location" tab > now finally choose your desired preference (Private/Public) and it should enforce it.
I haven't tested this recently, but I used to need to do this on some of my first installs.