How to stop windows file shares during migration

migrationnetwork-sharephysical-to-virtualwindows-server-2003

I'm getting ready to migrate a physical file server to our VM environment using VMware standalone converter. This file server has over 300 shares on it, so deleting all the shares and recreating them is not an option. I'd like to be able to disable access to each share during the migration. I can't simply turn off file sharing because VMware converter uses the service to do the P2V. Is there a way I can write a batch file to make the number of connections on each share 0?

Best Answer

Having just done something almost identical to this over the weekend, here's what I did.

On the Source server export: HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Shares On the Source server stop the Server service: sc stop Lanmanserver

Stopping lanmanserver will turn down all your shares.

Copy all our data over to the Target server.

On the Target server import the Shares registry values you exported. On the Target server restart the lanmanserver service and all your shares will repopulate.

Related Topic