locked
Powershell ACL set owner on sub folders and files & Add NTFS on sub folders and files RRS feed

  • Question


  • The owner of the folder and the NTFS new user modifications, and the administrator does not have permission to view the folder

    1.I need use Powershell ACL set owner on sub folders and files

    2.I need use Powershel Add NTFS on sub folders and files

    Tuesday, April 24, 2018 9:26 AM

All replies

  • help set-acl -online

    Follow the examples.


    \_(ツ)_/

    Tuesday, April 24, 2018 9:35 AM
  • 1>

    takeown /f c:\folder

    2>

    https://ss64.com/nt/icacls.html

    Tuesday, April 24, 2018 9:56 AM
  • 1>

    takeown /f c:\folder

    2>

    https://ss64.com/nt/icacls.html

    thank you!

    ICACLS can bulk modify subfolders and files permissions to domain users?

    I see it's about commands that need to specify SID


    Wednesday, April 25, 2018 4:33 AM
  • Hi,

    Based on your situation, you can try the following demo script to bulk set owner and grant permissions via icacls:
    Get-ChildItem -Path C:\somefolder -Recurse | ForEach-Object {
        icacls.exe $_.FullName /setowner somebody
        icacls.exe $_.FullName /grant 'somebody:xxxxxx'
    }

    If you need further help, please feel free to let us know.

    Best Regards,
    Albert

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, April 25, 2018 6:38 AM