Listing Access Permissions on an OU
i have small script trying reset permissions on ou. at point trying learn can or can't done , @ point of listing current permissions defined on ou , can't seem list permissions. anyone know have misconfigured in code below?
the $childou.name work , can members list back. i can list full code (it 27 lines) thought list problem is, since hope not doing correctly. the failure seems in foreach($access in $accesslist)
{
$childou.name
$oude = $childou.directoryentry
$accesslist = $oude.objectsecurity.access
foreach($access in $accesslist)
{
$access.identityreference # list account name
if($access.identityreference -eq "everyone"){write-host "found everyone"}
else {write-host "found nothing"}
}
}
tia
paul
sorry, forgot. i ended using separate set of powershell instructions working. some of have been doing posted out others.
http://gallery.technet.microsoft.com/scriptcenter/dump-acls-from-an-ou-8e2da85c
paul bergson
mvp - directory services
mcitp: enterprise administrator
mcts, mct, mcse, mcsa, security+, bs csci
2008, vista, 2003, 2000 (early achiever), nt4
http://www.pbbergs.com twitter @pbbergs
http://blogs.dirteam.com/blogs/paulbergson
please no e-mails, questions should posted in newsgroup. posting provided "as is" no warranties, , confers no rights.
Windows Server > Windows PowerShell
Comments
Post a Comment