Hi,
You can use the Set-Acl cmdlet to change the security descriptor.
$path = 'C:\Users(all users)\appdata\Local\Microsoft\Edge\User Data\Default\Extensions'
$acl = Get-Acl -Path $path
$ace = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList "Everyone", "Delete",1,0, "Deny"
$acl.AddAccessRule($ace)
$acl | Set-Acl -Path $path
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.