powershell command to change file folder permission
时间: 2024-02-20 19:59:45 浏览: 113
You can use the following PowerShell command to change file folder permission:
```
Get-Acl "C:\path\to\folder" | Set-Acl -Path "C:\path\to\folder" -AclObject (New-Acl -Oid "user or group name","permission level","inheritance")
```
Replace "C:\path\to\folder" with the actual path to the folder you want to change permissions for, and replace "user or group name" and "permission level" with the appropriate values for the user or group you want to grant permissions to.
阅读全文