Robocopy

Obviously, tailor it to what you’re doing, but this is my go to list of switches

robocopy "SourceDirectory" "DestinationDirectory" /e /copyall /v /log+:"LogFileLocation.log" 
  • Copies all directories, even empty ones
  • Retains all file and folder information (including permissions)
  • Creates a verbose log file at LogFileLocation to tell you what it did

Transferring FSMO Roles

Commands to transfer

ntdsutil
roles
connection
connect to server <ServerName>
q
transfer <RoleName>

List of FSMO roles (and syntax for transfer role command)

Schema Master (schema master)

Naming Master (naming master)

PDC Emulator (pdc)

RID Master (rid master)

Infrastructure Master (infrastructure master)

Checking for FSMO role holder

From a domain controller:

netdom query fsmo