Thursday, February 4, 2016

HowTo: Seize FSMO roles

  1. Log on to a working DC
  2. Open Powershell with Admin privileges
  3. Enter the following command to seize all roles
    Move-ADDirectoryServerOperationMasterRole -Identity "Target-DC" -OperationMasterRole 0,1,2,3,4
  4. Run the following command to confirm all roles have been seized. You should see the "Target-DC" as now holding all roles.
    netdom query fsmo

Wednesday, February 3, 2016

HowTo: Remove a dead DC from the domain

**Warning** ntdsutil is a powerful and unforgiving tool. Be sure you know exactly what operations it will be performing before you proceed. You will also want to confirm that the DC you're removing no longer holds any FSMO roles before proceeding.


This guide will show you how to manually remove a Domain Controller (DC) that is no longer online, or is unable to demote itself as a DC.

Forcibly remove from AD DS using NTDSutil

  • Open cmd.exe and run the following commands
  • Be sure to choose the correct server, or your Active Directory environment could become unstable
  • You will need to replace things like "serverName" with the actual name of the server you're working with
metadata cleanup
connect to server serverName
select operation target
list domains
select domain domainNumber
list sites
select site siteNumber
list servers in site
select server serverNumber
remove selected server
Click "yes"

Remove the DC from Sites and Services

  • Open "Active Directory Sites and Services" from the programs menu (or run dssite.msc)
  • Navigate to Sites default-first-site-name servers serverName
  • Right-click the serverName and choose "delete"

Manually remove DNS records

  • Browse through DNS and manually remove any associated A, NS, or CNAME records
  • Ensure SRV records no longer exist by opening cmd.exe and running the following commands. If any records for your dead DC, you will need to manually remove them.
  • nslookup
    set type=all

Tuesday, February 2, 2016

Commands: Sudo!!

If you're like me, you often forget to type sudo before a command that requires admin privileges and you probably see a lot of messages like this:

Simply type

to add the sudo command to the beginning of your last command

Monday, February 1, 2016

HowTo: Set up an Ubuntu workstation on an ESXi server


This guide will show you how to install a Ubuntu workstation on ESXi, and connect to it via RDP.

Initial Setup

  • Download ISO
  • Build VM w/16GB & 100GB drives, 2 vCPUs and 4GBs of RAM
  • Attach ISO, boot, install Ubuntu (installation guide)

VMware tools installation

  • Initiate the VMware tools installation through vsphere client
  • Extract the installer to the Desktop
    tar xzvf /media/<username>/VMware Tools/VMwareTools-9.4.0-1280544.tar.gz -C
  • Run the installer
    cd ~/Desktop/vmware-tools-distrib
    sudo ./ -d

Configure Static IP

  • Open network configuration file
  • sudo nano /etc/network/interfaces
  • Enter static IP information
  • auto <interface>
    iface <interface> inet static
  • Hold ctrl+o to write file

Update & Install necessary packages for RDP access

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xrdp
sudo apt-get install xfce4
sudo apt-get install xfce4-terminal
sudo apt-get install gnome-icon-theme-full tango-icon-theme
echo xfce4-session >~/.xsesson

Configure xfce for RDP access

Open file for editing

nano /etc/xrdp/

Update configuration to start xfce


if [ -r /etc/default/locale ]; then
  . /etc/default/locale


Restart xrdp service

sudo service xrdp restart

Connect to your VM from a Windows machine