On Windows 8 all you need to do is enable network sharing under:
PC-Settings → Network → Connections → INTERFACE
But in Windows Server 2012 it is a bit more complicated. For that you will need help of PowerShell.
This will give you a list of Interfaces on you system, note down the
InterfaceIndex of the
Interface you want to change Location type/profile of.
Set-NetConnectionProfile -InterfaceIndex [INDEX] -NetworkCategory Private
And voilà you are done.