- Log on to a working DC
- Open Powershell with Admin privileges
- Enter the following command to seize all roles
Move-ADDirectoryServerOperationMasterRole -Identity "Target-DC" -OperationMasterRole 0,1,2,3,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
A blog about security, OS', networking, software reviews, howtos, and anything IT-related...
Thursday, February 4, 2016
HowTo: Seize FSMO roles
Labels:
Active Directory,
HowTo,
Server 2012r2,
Windows
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.
Overview
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
ntdsutilClick "yes"
metadata cleanup
connections
connect to server serverName
q
select operation target
list domains
select domain domainNumber
list sites
select site siteNumber
list servers in site
select server serverNumber
q
remove selected server
q
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
_ldap._tcp.dc._msdcs.domainName
Labels:
Active Directory,
Commands,
HowTo,
Server 2012r2,
Windows
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
Simply type
sudo!!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
Overview
This guide will show you how to install a Ubuntu workstation on ESXi, and connect to it via RDP.Initial Setup
- Download ISO http://www.ubuntu.com/download/desktop
- 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 ~/Desktop/
- Run the installer
cd ~/Desktop/vmware-tools-distrib sudo ./vmware-install.pl -d
Configure Static IP
- Open network configuration file
sudo nano /etc/network/interfaces
auto <interface>
iface <interface> inet static
address 10.0.10.90
netmask 255.255.255.0
gateway 10.0.10.254
dns-nameservers 8.8.8.8 4.2.2.2
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/startwm.sh
Update configuration to start xfce
#!/bin/sh
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
fi
startxfce4
Restart xrdp service
sudo service xrdp restart
Connect to your VM from a Windows machine
Subscribe to:
Posts (Atom)