Windows Server 2012 includes .NET Framework 4.5 and Windows Server 2012 R2 includes .NET Framework 4.5.1. The .NET Framework provides a comprehensive and consistent programming model to build and run applications (including Roles and Features) that are built for various platforms. Windows Explorer (Graphical Shell), Server Manager, Windows PowerShell, IIS, ASP .NET, Hyper-V, etc, are all dependent on .NET Framework. Since there are multiple OS components dependent on .Net Framework, this feature is installed by default. Therefore, you do not have to install it separately.
It is not recommended to uninstall .NET Framework. In some given circumstances, there may be a requirement to remove/re-install .Net Framework on Windows Server 2012/2012 R2.
When you uncheck the .NET Framework 4.5 checkbox in the Remove Roles/Features Wizard of Server Manager, Windows will check all roles/features that may also be installed as it would need to be removed as well.. If there are other roles or features dependent on .NET Framework, those would be listed in this additional window.
it will leave the server installed in Core and you will be able to get the command prompt only.
i) Run the below commands one by one
DISM.exe /Online /enable-feature /featurename:NetFx4 /all
DISM.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell /all
ii) Reboot the server
iii) To restore the GUI need to run the PowerShell commands. Below procedure how to open PowerShell prompt in server core’s command prompt
a) To begin, press CTRL-ALT-Del and select Task Manager from the list
b) Once Task Manager Opens select File and Run new task
c) You should now see the Create new task menu, type PowerShell.exe and select OK
d) PowerShell prompt should now be open
iv) Run the below commands on the PowerShell prompt
v) Once the GUI Shell is installed, you will need to restart the server with the following command: