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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
Can you not use CACLS command and pipe the result to a text file?

CACLS - Display or modify Access Control Lists (ACLs) for files and folders


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sumit GuptaSystem and Virtualization EngineerCommented:
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.

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

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

To export the permission from a particular mailbox:

Export-MessageOps.AllFolderPermissions –p $ewsprofile –id –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.
To import exported Mailbox permission and clear any existing permissions:

Import-MessageOps.FolderPermissions –p $ewsprofile –id –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 -filename c:\perm\ MailboxPermisions.xml –Clearexisting $true
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.