(imported topic written by dmoore21)
Good afternoon,
I was wondering what the best way to query for share permissions would be? I have the following query, but it will just give me basic read, write, execute permissions - I would like to query for something like “full control”
(name of it, (if (not exists entries of dacls of security descriptors of it) then “n/a” else ((trustee of it as string & “:” & (if ( read permission of it) then “R” else “”) & (if ( write permission of it) then “W” else “” ) & (if (execute permission of it) then “X” else “”)) of entries of dacls of security descriptors of it))) of network shares whose (name of it does not contain “$”)