I'm working on a windows server 2008 r2 and I'm trying to export the configuration of shared folder with all the groups associated to them,permissions and file system permissions.
is there a way to do that?
maybe with powershell?
@edit: another problem is that I need to do that after a reboot, so I have to save the configuration in a file for example and then reimport it.
Best Solution
If you want to backup/restore all existing shares you could export/import the registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares
.Backup:
Restore:
File/folder ACLs can be saved and restored like this:
Backup:
Restore: