Summary: How can I automatically (script) check all the permissions for files and folders on a drive, and if a permission is tied to a local computer account have a new permission added: with a Domain Account with the same permissions.

Details: I inherited a Windows 2008 file server that has many files and folders with Builtin (local) permissions like:

BUILTIN\Users :(ID)(...)(special access:) BUILTIN\Administrators :(ID)(...)

To allow domain users access - the server has \Domain Users included in the local\Users and \Domain Administrators in the local\Administrators group.

I want to move the files to another device (NetApp) and retire the File Server. When the File Server goes offline, the local permissions will be orphaned, and Domain Users will not have access to the files. (please correct me if I am mistaken) The directory structure and permissions are somewhat complicated - this combined with the large quantity of files and folders makes it too time consuming to add the Domain credentials one at a time.

Is there a way to:

  • Loop thru each folder\file
  • If BuiltIn\Users has permissions on the folder\file
  • Add domain\Domain Users with the same permissions

Or maybe there is another solution?

EDIT: I found this script that does part of what I am looking for. http://windowsitpro.com/windows/jsi-tip-0596-how-do-i-print-permissions-directory-tree It goes thru all the folders and obtains the existing permissions.

I need to include files and a way to:

If account is BuiltIn\Users:
    Add "mydomain\Domain Users" (with same permissions as BuiltIn\Users)

I found out that robocopy and Netapp are smarter than I gave them credit for... When we began copying the files to the new location the Builtin User permissions were automatically changed from:




Problem solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.