Backing up Active Directory with Windows Server 2016 can be achieved by following the below instructions. We use this for small businesses that don't want to use the more expensive third-party backup options.
Setting Up Server Backup Environment
First you need to have a separate volume partition to save the backup too. I am will do this for my Windows 2016 Virtual Server by adding a hard disk below:
Now you will need to run the following PowerShell commands to setup Active Directory Backup. Please also note that PowerShell will need to be ran as Administrator.
- On the domain controller server, run get-disk to view all the hard drives available.
- Run set-disk PowerShell command below.
Now run the get-disk command again and you will see it is now online.
- Now we need to initialize the disk by running initialize-disk command.
- And then we need create a partition on the new disk by running the New-Partition command.
- Now run the Format-Volume command to format the drive as NTFS.
- Now we are ready to create the Windows Server Backup Policy. We need to start by installing the Windows Server Backup feature by running the following command.
You can the search all the commands in the module by running the below command.
Create and define the parameters for the Server Backup Policy
- Create a variable to hold the new policy. We will be setting all the parameters in the variable with PowerShell.
- We will start adding system state to the backup process.
- Now we get all the volumes on the server to determine what needs to be backed up and where we want to back them up to.
- Now we get the C: drive, which is the drive we want to backup. Remember we already added system state to the backup policy which contains AD.
- Next, we create $Volume variable so we can add it to the policy.
- Now we need to add the volume variable to the policy by running the Add-WBVolume.
- We need to now set the backup destination location, which will be set as the E: drive.
- Now we need to schedule the backup.
- Finally, we need to set the policy. And because we want to see it work we can run the policy right away by running the Start-WBBackup command.
We are your Microsoft Server professionals. If you need assistance with your Microsoft Server, give us a call today!