Hi I am David

Network & Systems Professional From the Netherlands

Server

A time ago I had to move data from a old server to a new server.
 
I chose to do this with help of DFS Replication, because it replicates automatically without to much hassle and it's easy to configure.

Also it would maintain the security settings of the files and folders.
After a while I ran a DFS Diagnostic report to check how many files are synced in the replication group and if the numbers where the same between the source server and its destination.
 
I noticed that i was missing a few hundred files... not the news you wanted to read.
So I checked which files that were by searching them on the old server; the DFSR report showed me a couple of files that were not synced.
 
By checking the files; I at first didn't noticed something odd. After searching I came across this technet blog.
 
The problem was that some files had the attribute TEMPORARY set, by nature DFSR does not replicate them because of this.
 
To solve this you should search every file within the 'problem' folder that has the TEMP attribute set and remove it.
Good news; Power Shell can do that for you :)
 
Open Power Shell ISE in Administrator mode and paste this:
 
Get-childitem "D:\Your Problem Folder" -recurse | ForEach-Object -process {if (($_.attributes -band 0x100) -eq 0x100) {$_.attributes = ($_.attributes -band 0xFEFF)}}
 
After this, force a resync for you DFS replicated folders and check if the files of source and destination are the same.
 
Cheers,
David
Applicable from Windows 2008 up to 2012 R2
 
When you want to migrate DHCP from one server to another, and you want to keep the DHCP scope as is; you will always have the challenge with current DHCP Leases that already are given to clients.
 
To overcome this; we can easily migrate the leases from the older server to the new one.
 
Firstly prepare your NEW server with the DHCP feature; also be sure that this server is 2012 or up and it's ready to serve it's role.
After that you must run this in Power Shell; I always prefer Power Shell ISE for this, because you can see the code an easily adjust where needed. Also don't forget to run Power Shell in Admin Mode.
 
Export-DhcpServer –ComputerName oldserver.domain.extension -Leases -File %userprofile%\Desktop\dhcpexp.xml -verbose
Import-Dhcpserver –ComputerName newserver.domain.extension -Leases -File %userprofile%\Desktop\dhcpexp.xml -BackupPath C:\windows\temp\ -verbose

After that, just disable the DHCP feature on your old server. Also be sure that any IP helpers (if applicable) are updated to point to your new server.
 
Regards,
David