Q: Is there an easy way to back up and restore the share permissions defined on a Windows XP or Windows Vista system?

A: You can back up share permissions by exporting the contents of the Shares registry key. To do so, open regedit, navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares key, right-click the key, and select Export. Then, in the Export Registry File dialog box, type a file name to save the share permissions to a .reg file. To restore the share permissions, double-click the .reg file, which will import the share permissions back into the registry.

You can also back up and restore share permissions from the command line using the Reg (reg.exe) command-line tool. To back up share permissions, type the following at the command line, where shares.reg is the name of the file in which you want to save the share permissions:

reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares shares.reg
To restore the permissions in the shares.reg file from the command line, type
reg import shares.reg

Please or Register to post comments.

Upcoming Training

Mastering System Center 2012

During over 6 hours of training you can join John Savill from your computer as he will walk you through the key components and capabilities of System Center 2012, what’s involved in using the components, and the benefit they can bring to your environment.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.