Active Directory can be brought offline in a couple of ways.
The traditional was is to boot into Directory Services Restore Mode (DSRM), which is a safe mode boot option for Windows Server domain controllers.
To boot in to DSRM from the command prompt type bcdedit.exe /set safeboot dsrepair and restart the machine.
Windows 2012 includes active directory as a service, this allow Active Directory to be taken offline by stopping the service
(image)