To backup share permissions, export the Shares registry key.
- Open Regedit to the following location:
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares - Right-click the Shares registry key and select Export. Give it a file name such as shareperms.reg.
Use the Reg
reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares shareperms.reg
To restore:
reg import shareperms.reg
Backup and Restore of NTFS Permissions
Use this command to backup NTFS permissions:
icacls d:\data /save ntfsperms.txt /t /c
The /T switch allows it to get subfolder permissions too. The /C switch allows it to continue even if errors are encountered (although errors will still be displayed).
Use this command to restore them:
icacls d:\ /restore ntfsperms.txt
No comments:
Post a Comment