Migrate shares from one Windows server to another
If you need to migrate your shares from one Windows server to another, the Microsoft documentation will give you the “proper” process (by way of File Server Resource Manager). This is a much quicker and dirtier method that I’ve used many times.
Perhaps you’re migrating your file server, or simply setting up another one; everyone at some point will need to migrate SMB shares and permissions. Luckily, it’s a relatively painless process:
Firstly if you haven’t already done so you should copy the data to the new server, keeping permissions and attributes intact
- On the old server: open regedit and browse to: HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares
- Export the key
- On the new server: check the same key and see if any shares already exist and need to be kept. If they do, export the key and keep it safe.
- Transfer the exported registry key to the new server and double-click to import it.
- (if you need to reinstate the original shares, re-import the new reg key over the top)
- Reboot the server and that’s it!
I told you it was easy!