copy folders with same permissions of users and groups

Welcome Forums General PowerShell Q&A copy folders with same permissions of users and groups

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
2 years, 2 months ago.

  • Author
    Posts
  • #49508

    Participant
    Points: 0
    Rank: Member

    Hi Everyone

    Please let me know whether powershell or python, which will be better to set permissions of groups and users on copy folders.
    I have copied folders from once location E:\IT_softwares to other location \\nas01\migration\IT_softwares

    this powershell ACl command is giving errors.

    Get-Acl E:\IT_softwares | Set-Acl \\nas01\migration\IT_softwares -confirm command gives error.

    Set-Acl : Attempted to perform an unauthorized operation.
    At line:1 char:94
    + Get-Acl E:\IT_Softwares\3DsMax2015\VirtualCloneDrive\SetupVirtualCloneDrive5470.exe | Set-Acl <<<< -path \\nasinnd01.ali.local\Migration_Test\Test\3DsMax2015\VirtualCloneDrive\ SetupVirtualCloneDrive5470.exe -confirm + CategoryInfo : PermissionDenied: (\\nasinnd01.ali...neDrive5470.exe:String) [Set-Acl], UnauthorizedAccessException + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetAclCommand does robocopy or emcopy has any features that can copy same permissions from one location to other ?? thanks everyone for reading and answering my post.

  • #49527

    Participant
    Points: 0
    Rank: Member
    robocopy source destination /secfix /xo /xn /xc

    It's baked in to windows so you should be good to go off the bad.

    https://support.microsoft.com/en-us/kb/323275

    • This reply was modified 2 years, 2 months ago by  Anthony.
  • #49541

    Participant
    Points: 0
    Rank: Member

    Hi Anthony

    i was also considering icacls commands, i am testing this icacls and then i will post my conclusion.

    Request any member, who reads my post, please suggest any more ideas.

    thanks

The topic ‘copy folders with same permissions of users and groups’ is closed to new replies.