In a scenario of upgrading windows server or re-installing servers the easiest way to preserve the windows shares is:
- Export the reg-key : right click on “shares” [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares] and then export to a file.
- Edit the file : You can then edit the file and delete unwanted shares and security keys.
- Copy the files from the old server to the new one to the same drive : Its is important to keep the drivers same as they were on the old server. (C:\ , D:\ …) You must copy the file and preserve the ntfs security, better to copy with Total Commander or other way with the option to keep the security (SID)
- Replace the name of the old server with the new one so the login script will re-map the share folders as before
- Done with a smile 🙂