📎 AI Summary:
The thread discusses how to set full control permissions on a file using PowerShell. The original poster asks about "permission archive" but clarifies later that they want to grant full control permissions to a file. Neemobeer provides a sample PowerShell script to modify ACLs and grant full access to a specified user, guiding the original poster on how to achieve this.

michelbdec

New Member
Joined
May 6, 2019
Messages
4
Thread Author #1
what permission archive in powershell?
 

Solution
Something like this would give a user full access. You'd just need to change the Get-ACL and Set-ACL lines to the directory or file you want to change permissions on. and change computername\user to the user you want to grant the access for.

Code:
$ACL = Get-ACL .\Temp\
$Rule = [System.Security.AccessControl.FileSystemAccessRule]::new(@"computername\user",[System.Security.AccessControl.FileSystemRights]::FullControl,[System.Security.AccessControl.AccessControlType]::Allow)
$ACL.Access.AddRule($Rule)
Set-Acl -Path .\Temp\ -AclObject $ACL

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
Saying it again it still makes no sense. You want to archive something with Powershell?
 

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
Something like this would give a user full access. You'd just need to change the Get-ACL and Set-ACL lines to the directory or file you want to change permissions on. and change computername\user to the user you want to grant the access for.

Code:
$ACL = Get-ACL .\Temp\
$Rule = [System.Security.AccessControl.FileSystemAccessRule]::new(@"computername\user",[System.Security.AccessControl.FileSystemRights]::FullControl,[System.Security.AccessControl.AccessControlType]::Allow)
$ACL.Access.AddRule($Rule)
Set-Acl -Path .\Temp\ -AclObject $ACL
 

Solution