Looks for Domain Controller Authenticated for current login user:
C:\>echo %logonserver%
\\GFLDC3
C:\>set L
LOCALAPPDATA=C:\Users\testuser\AppData\Local
LOGONSERVER=\\GFLDC3
Looks for Domain Controller Authenticated for current computer:
C:\>nltest /DSGETDC:
DC: \\DC01.domain.local
Address: \\10.0.0.100
Dom Guid: abc33e3-1f7f-42a8-904d-358f2400gfh
Dom Name: domain.local
Forest Name: domain.local
Dc Site Name: DCsite01
Our Site Name: DCsite01
Check which Domain Controller applied group policy to current computer and user:
Note: as show in the below result after running the command, user and computer get group policy apply from different DC
C:\gpresult /r
COMPUTER SETTINGS
------------------
OU info
Group Policy was applied from: DC01.domain.local
Group Policy slow link threshold: 500 kbps
Domain Name: domain
Domain Type: Windows 2008 or later
COMPUTER SETTINGS
------------------
OU info
Group Policy was applied from: DC02.domain.local
Group Policy slow link threshold: 500 kbps
Domain Name: domain
Domain Type: Windows 2008 or later
Robocopy example
robocopy c:\temp\source c:\temp\destination /E /COPYALL /DCOPY:DAT /R:100 /W:3
robocopy c:\temp\source c:\temp\destination /E /xo /fft /COPYALL /DCOPY:DAT /R:100 /W:3 /LOG:C:\temp\robocopylog.txt
/E : copy all subfolder include empty folder
/COPYALL : create completely identical copy include NTFS owner and auditing information
/DCOPY:DAT : copy for director, D stand for data, A stands for attributes, T stands for time-stamps
/R:100 : number of retries on failed copies for 100 times, if a file is locked
/W:10 : wait for 10 seconds before retries
/xo : Source directory files older than the destination are excluded from the copy.
/fft : Assume FAT File Times (2-second date/time granularity)
/LOG:C:\temp\robocoylog.txt : write log to C:\temp\robocoylog.txt
/MIR : mirror