Unable to set ACL on Remote Registry -Kindly HELP

**************************** :slight_smile: :slight_smile: :slight_smile: **************************************

GUYS found the solution after 4-5 days of permutations and combinations and guess what !!! it was very simple though tricky
Here it is : —

Invoke-Command -ComputerName “” -ScriptBlock{
$acl= get-acl -path “hklm:\SOFTWARE\Microsoft”
$inherit = [system.security.accesscontrol.InheritanceFlags]“ContainerInherit, ObjectInherit”
$propagation = [system.security.accesscontrol.PropagationFlags]“None”
$rule= New-Object System.Security.AccessControl.RegistryAccessRule(“Domain users”, “FullControl”, “ContainerInherit, ObjectInherit”, “None”, “Allow”)
$acl.addaccessrule($rule)
$acl|set-acl
}