Windows 10 permission archive in powershell

michelbdec

New Member
Joined
May 6, 2019
Messages
4
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
I'm not really sure what you're asking.
 

what permission archive in powershell?
 

Saying it again it still makes no sense. You want to archive something with Powershell?
 

I want to give fullcontroll permission to file
 

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
permission in file
 

Last edited:
Back
Top