How to Remove an Orphaned Domain Controller (2008r2+)

If you ever lose a DC or one gets deleted before it is properly demoted using DCpromo

… or maybe you tried DCpromo but it wasn’t able to clean up AD on your other DC’s.

As of Windows 2008r2, if you right click and delete a computer object that happens to be a domain controller you will be prompted with the message shown below. Just tick off the checkbox and away you go; now you don’t have to go into ADSI Edit and clean out the old server, ADUC does it for you!! 🙂


Don’t forget though… you still have to go into DNS and clean out all the Name Servers and other entries pointing to your old (now dead) DC.

Admittedly, I’m no AD expert…
Did I miss anything? Let me know in the comments.

How to Retrieve Windows Server 2008r2 Product Key using Powershell

Magical Jelly Bean key finder and and others like it, as I have just learned, do not work with Windows 2008r2 because MS has encrypted the key in registry.

There are a few pay for programs that can retrieve the key for you, but luckily someone much smarter than me has written a very succinct PS script that returns the key, unencrypted 🙂

You can find the code here, or copy it below.

  • Look in the comments of the above linked page for specific instructions on how to save and run the script (if you’re not to sure on powerscript)

  • Don’t forget to run set-executionpolicy remotesigned first

PS Script:

How to Mount an NFS Share to Windows Server

…It’s not all that difficult. Who knew (shrug).

this should work for Windows 2008r2 and later

  1. Install the File Services Role

  2. If the role is already installed (like it was for me), you just need to enable the NFS Service for that role:


  3. Mount drive just like any other mapped drive:

  4. You will now see the drive mounted under Computer:

    Note: You can now use the mount and umount commands to manipulate NFS mounts through command line: