Open nntrn opened 1 year ago
get-acl C:\path_with_desired_permissions | set-acl C:\path_lacking_desired_permissions
# set recursively
$perm = Get-Acl C:\path_with_desired_permissions
Get-ChildItem C:\path_lacking_desired_permissions -Recurse | Set-Acl -AclObject $perm -WhatIf
$DogACL = Get-Acl -Path "C:\Dog.txt"
Set-Acl -Path "C:\Cat.txt" -AclObject $DogACL
Get-Acl -Path "C:\Dog.txt" | Set-Acl -Path "C:\Cat.txt"
$NewAcl = Get-Acl File0.txt
Get-ChildItem -Path "C:\temp" -Recurse -Include "*.txt" -Force | Set-Acl -AclObject $NewAcl
List the pending/missing Windows updates.
Source