Link to home
Start Free TrialLog in
Avatar of ITBUFF
ITBUFF

asked on

Windows 2008 Server - Export Folder permissions to a file or XML

Our server is acting strange due to a virus passing through our virus scanner. Our backups is not restoring folder permissions properly.

Does anyone know if there is either an application that can nicely capture (export) Windows 2008/NT Security Permissions, or possibly a working script ?

I have tried a few scripts that export in a weird unreadable fashion.

This request is pretty urgent...

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Emmanuel Adebayo
Emmanuel Adebayo
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Export Mailbox Folder Permissions

Export-MessageOps.FolderPermissions exports all the folder permission on a particular folder to a file.

Export-MessageOps.AllFolderPermissions exports all the folder permissions from a particular mailbox in a folder path to an xml file.

Example
To exports all the folder permission on a particular folder to a file:

Export-MessageOps.FolderPermissions –p $ewsprofile –id mailbox@domain.com –fp \\Inbox –filename c:\perm\Folderpermisions.xml

To export the permission from a particular mailbox:

Export-MessageOps.AllFolderPermissions –p $ewsprofile –id mailbox@domain.com –filename c:\perm\MailboxPermisions.xml

Import Mailbox Folder Permissions

Import-MessageOps.FolderPermissions imports all the folder permissions of a particular mailbox folder from a file exported with Export-MessageOps.FolderPermissions.

Import-MessageOps.AllFolderPermissions imports all Mailbox folder permissions from a file exported with Export-MessageOps.AllFolderPermissions.

If the ACE already exists on the mailbox folder, the ACE will either be updated with the permission stored in the file or it will be added.

Both cmdlets have the following parameter:

Clearexisting : Boolean parameter with two possible values: $true or $false. This parameter controls the removal of an existing ACE that isn’t in the export file. Set to$false by default.
Example
To import exported Mailbox permission and clear any existing permissions:

Import-MessageOps.FolderPermissions –p $ewsprofile –id mailbox@domain.com –fp \\Inbox –filename c:\perm\Folderpermisions.xml –Clearexisting $true

To import exported Mailbox permission and clear any existing permissions:

Import-MessageOps.AllFolderPermissions –p $ewsprofile –id mailbox@domain.com -filename c:\perm\ MailboxPermisions.xml –Clearexisting $true