Using powershell to return folder permissons -
i new powershell , trying use script found return folder permissions :
function get-secgroups($path)  {    $a = @{};   get-acl -path $path | %{write-host `n $path; $_.access} | %{     #only show permissions on folder, not files      #check see if user/group has "list" permission      if ($_.inheritanceflags -eq "containerinherit")      {        write-host `t $_.identityreference "list";     }     else      {        write-host `t $_.identityreference, $_.filesystemrights;      }    }  }  #end get-secgroups  get-childitem -path "d:\*\*\" | {$_.psiscontainer} | %{get-secgroups($_.fullname)} | out-file c:\output.txt  the problem have creates output.txt no data. data displayed on screen. going wrong?
juste replace write-host write-output in function.
Comments
Post a Comment