Naveed 0 Posted July 27, 2010 I have searched everywhere for this but cant find an answer maybe i am looking for the wrong thing but let me explain the situtation.I have folder X (\\server\location1\foldername)I would like to be able to put that full path into a script and obtain the security groups listed in the security tab for the properties of that folder?Is this possible, i have tried doing it with autoit and WMI(Win32_LogicalFileSecuritySetting) and vbs(Win32_Directory) but both these methods dont show the security groups. Can anyone help??RegardsNav Share this post Link to post Share on other sites
ShawnW 0 Posted July 27, 2010 (edited) I couldn't find a way in autoit to do this on my network shares, but I did find this handy tool called DumpSec.http://www.systemtools.com/somarsoft/index.htmlWhen you install it don't install Hyena (it will ask you), that needs to be purchased but just installing DumpSec is free. Edited July 27, 2010 by ShawnW Share this post Link to post Share on other sites
JLogan3o13 1,637 Posted July 27, 2010 I have not been able to do this with a UNC name, but have been able to do so by mapping a drive to the server. Something like the snippet below might work for you, if you'll be hitting the same machine often for your queries.\\Server\Apps mapped to Z:$var = InputBox( "", "Enter the directory" ) Run(@ComSpec & ' /c CACLS ' & $var & '> C:\CACLS.txt', "", @SW_HIDE)This unfortunately gives you everything, both groups and individuals, but it may be a place to start... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Share this post Link to post Share on other sites
Naveed 0 Posted July 30, 2010 I have not been able to do this with a UNC name, but have been able to do so by mapping a drive to the server. Something like the snippet below might work for you, if you'll be hitting the same machine often for your queries. \\Server\Apps mapped to Z: $var = InputBox( "", "Enter the directory" ) Run(@ComSpec & ' /c CACLS ' & $var & '> C:\CACLS.txt', "", @SW_HIDE) This unfortunately gives you everything, both groups and individuals, but it may be a place to start... That is brilliant, Thanks for that, that actually did the trick, after getting the list of all the groups i was able to isolate just the security groups. I had to map to the folder first and recycle the drive letter on each new request. DriveMapDel("X:") $var = GUICtrlRead($path) DriveMapAdd("X:", $var) Sleep(2000) Run(@ComSpec & ' /c CACLS ' & "x:" & '> C:\CACLS.txt', "", @SW_HIDE) Share this post Link to post Share on other sites