i teaching myself powershell , how used in managing active directory. i know how manage ad via gui.
the textbook i'm reading dealing adding access rule access control object. i understand text example, don't understand why textbook example starts code line: set-alias no new-object. i don't understand means , can't seem find explanation. i understand set-alias , new-object cmdlets, have no idea "no" there for. any assistance appreciated. thanks.
i teaching myself powershell , how used in managing active directory. i know how manage ad via gui.
the textbook i'm reading dealing adding access rule access control object. i understand text example, don't understand why textbook example starts code line: set-alias no new-object. i don't understand means , can't seem find explanation. i understand set-alias , new-object cmdlets, have no idea "no" there for. any assistance appreciated.
also, why there "no"in 4th line of code, new access rule added directory's access control object?
thanks assistance in matter!
in first post didn't include code block. here is:
set-alias no new-object
$acl = get-acl c:\logs
$perm = "room5\test","fullcontrol","allow"
$r = no system.security.accesscontrol.filesystemaccessrule $perm
$acl.addaccessrule($r)
$resc = gci c:\logs -recurse -force
foreach($f in $resc) {
write-host $f.fullname
$acl | set-acl $f.fullname
}
Windows / Windows 10 / Network & internet / PC
Comments
Post a Comment