You have a Windows File Server and you want to migrate the windows shares. What options do you have to complete this job? A) recreate them or B) migrate them from ServerA to ServerB. Sometimes option A is the only one you have but in most cases you want to keep those Windows Shares available as they were before and using some kind of script would be nice. Microsoft published a KB125996 article based on following procedures and my option B:
- Reinstall Windows over an existing installation (a clean install, not an upgrade).
- Move all of your data drives from one server to another.
- Install Windows to another folder or drive on a computer that already has Windows installed.
I am performing a clean installation of a application server which has several file shares associated for application functionality. I don’t want to recreate them manually and I am using the next steps to complete this task.
a) Verify the shares you want to migrate and the drive letter location is the same on both servers.
b) Export the Shares key from HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares
reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares LanmanServer.reg
c) Make sure the user and group still exist in the domain! When migrating from DomainA to Domain B make sure you recreate all users and groups. Copy LanmanServer.reg to ServerB and import the registry file.
net stop server & net start server
Reboot the file server and verify the share with “net share” command; also check the System Eventlog for any warnings or errors.
Leave a comment