Tuesday, October 07, 2014

Snapshot of Active Directory in Windows Server 2012 R2

Open a PowerShell window and type:

  • NTDSUTIL
  • SNAPSHOT
  • ACTIVATE INSTANCE NTDS
  • CREATE

clip_image002

Note the GUID that is created (above mine is 4f54…….), or just leave the CMD prompt open. You can LIST ALL to see the GUIDs later.

QUIT and QUIT to exit from snapshot or you can mount that GUID

If you did quit, use

  • NTDSUTIL
  • SNAPSHOT
  • ACTIVATE INSTANCE NTDS
  • LIST ALL

If you  just enter the next command it is

  • MOUNT YOUR-GUID-YOU-WANT

clip_image003

QUIT and QUIT to exit from the mount process

To start the ADDS and export files from it find the name of the snapshot with DIR C:\$*.*

Then start it up with

  • DSAMAIN /DBPATH C:\$SNAP_date&time_VOLUMEC$\WINDOWS\NTDS\NTDS.DIT /LDAPPORT 6660

clip_image005

Leave DSAMAIN / CMD running in the background

Open Active Directory Users and Computers (or LDIFDE etc) and select CHANGE DOMAIN CONTROLLER YOURCOMPUTERNAME:6660

clip_image006

clip_image007

clip_image008

This is the old Active Directory from the backup.

clip_image009

Note what you need or export what you need etc.

When finished close the command prompt or press CTRL+C to stop DSAMAIN.EXE

To close the open snapshot issue the following commands

  • NTDSUTIL
  • SNAPSHOT
  • ACTIVATE INSTANCE NTDS
  • LIST ALL
  • UNMOUNT YOUR-GUID
  • QUIT, QUIT

Done. Now you just need a daily, weekly task to do the backup.

Post a Comment

Blog Archive