Category Archives: Windows Server 2012 R2

Windows Server 2012 R2 only boots to command prompt

A week back I had encountered a very strange behavior with one of our servers running on Windows Server 2012 R2. My colleague was trying something on the server where he had to remove the .Net Framework 3.5 or so, but in the midst of all this, he restarted the server and the sever boots only to command prompt. Upon checking the server, I figured out that it was doing all the basic functions that were allowed to do while being on a command prompt window. But it was not opening Servermanager or Powershell at all. This made me suspicious on it’s behavior.

I did a bit of research on this issue and found out from a Technet blog that for some reason, the GUI installation of the server was undone and it was now acting like a core server installation (where only command prompt operations were possible). Sounds somewhere like LINUX right? Yes that’s what I thought too. There were instructions on how to get the GUI part of the server back.

We are asked to run the following command from the command prompt that is open upon logging into the server:
Dism /online /enable-feature /featurename:Server-Gui-Mgmt /featurename:Server-Gui-Shell /featurename:ServerCore-FullServer /all

This will install the GUI features and all the requisites for those features. The installation itself will take quite a while. Once the installation is complete, reboot the server with the command “shutdown /r /t 0“. The server also prompts to be restarted once the installation is complete. However I chose to run the command after hitting a “No” to the restart option. The GUI features were installed back after the restart.

Advertisements

Error: Resource Referenced in attribute displayName could not be found – Windows Server

AdministrativeTemplates

If you overcome above error on your Windows Server ; you will need to download the Administrative Templates from the Microsoft Website (KB2841134)

http://www.microsoft.com/en-us/download/details.aspx?id=40905

Using netsh command to extract dhcp client list

Applies to Windows Server 2008 and above

Please note that in future versions of Windows, Microsoft might remove the Netsh Functionality for DHCP Server. The recommended usage is with Windows Powershell. We will explore that in a later post.

In this example I have considered DHCP Server as \\mydhcpservername and scope as 192.168.0.0

Run Command Prompt

c:\>netsh
netsh>dhcp
netsh dhcp>server
netsh dhcp server>\\mydhcpservername
netsh dhcp server>show scope 192.168.0.0

Changed the Current Scope Context to 192.168.0.0 Scope

netsh dhcp server scope>show client 1

The above command will list the following in the below order

  • IP Address
  • Subnet Mask
  • MAC Address
  • Lease Expiry
  • Type of Lease
  • Name of Connected Device

Get-DHCPServer cmdlet in Windows 2012R2 Server

DHCP Server Cmdlets in Windows PowerShell

The GET-DHCPServer cmdlets get automatically installed if the DHCP Feature is installed in your Windows 2012R2 Server

But if you are using the Windows 2012 R2 Server as a member server and your DHCP is running on either a Windows 2003 / Windows 2008 Server you will need to install the Remote Server Administration tool instead

Just run below command to get the cmdlets

Install-WindowsFeature -Name RSAT-DHCP

Access Based Enumeration – Windows Server 2012 R2

This is a continuation of my previous post about ABE. The last post was how to enable ABE on Windows Server 2008 or 2008 R2 platforms. This post will have the steps to enable ABE on Window Server 2012 R2.

To enable ABE on Windows Server 2012 R2

1. Open Server Manager.

Image

2. Click  “File and Storage Services”.

Image

3. Click “Shares”. This will display the shared folders that are currently present.

4. Right click on the required “Shared Folder” and click Properties.

Image

5. Go to Settings and this will display a list of options on the right hand side of the window.

Image

6. Enable access-based enumeration.

Image