Re: How can I script a full listing of a security group rights ass

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



OK, Last question.

With the directories it is searching, I have them on a SAN that creates
snapshots.
Those snapshot directories start with a ~, so I have a directory called
s:\~.5hours, one called s:\~1hour etc.

How can I add an exclusion in this script to skip all directories with a ~
in front.

Thanks again for the help.

"Gordon" wrote:

This is an active directory security group (chd.employees) that I am trying
to enumerate and find all the folders or objects that the group has access to.

When I run your script it comes up and says:

File Not Found
'"chd.mployees"' is not recognized as an internal or external command,
operable program or batch file.


Myself not being a great scripter any ideas?

Thanks again for the help!!!!




"Pegasus (MVP)" wrote:


"Gordon" <Gordon@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:24F3E504-19C6-44AD-AA25-EA362C5B99B8@xxxxxxxxxxxxxxxx
I have a security group called chd.employees

I want to know all folders that this group has access to whether it's
read/write/list etc.

I have scoured the newsgroups looking for something to help me with this.

Does anyone have one to do this or any suggestions on where to look.

Thanks in advance.

Gordon

You could run this batch file:
@echo off
if exist c:\perms.txt del c:\perms.txt
dir /s /b /ad "d:\User Data" > c:\Dir.txt
for /F "tokens=*" %%* in (c:\Dir.txt) do cacls "%%*" | find /i
"chd.employees" >nul && echo %%* >> c:\perms.txt
notepad c:\perms.txt

Watch out for line wrap!



.



Relevant Pages

  • Re: Unable to run .bat files using SMS
    ... The batch file is running as an admin. ... partition on the hard disk, create several folders and ... on a few hundred domain controllers in our enterprise. ... The script runs fine when run from a local ...
    (microsoft.public.sms.admin)
  • Re: How can I script a full listing of a security group rights ass
    ... Those snapshot directories start with a ~, so I have a directory called ... to enumerate and find all the folders or objects that the group has ... When I run your script it comes up and says: ... operable program or batch file. ...
    (microsoft.public.scripting.vbscript)
  • Re: Script to create multiple folders
    ... You could script it or you could import the names into an excel spreadsheet ... and add mkdir to the command and create a batch file to do it. ... >I have about 300 folders I need to make all based on usernames witch I have ...
    (microsoft.public.windows.server.scripting)
  • Re: How can I script a full listing of a security group rights ass
    ... newsreader turns it into two lines then you must turn it back ... When I run your script it comes up and says: ... operable program or batch file. ... I want to know all folders that this group has access to whether it's ...
    (microsoft.public.scripting.vbscript)
  • Re: Login Script group membership
    ... Would it be more managable to write this as a vbs instead of a batch file? ... script, as not all o/s's can run a .vbs file directly as a logon script. ... - you'd need to write a wrapper function to invoke ifmember and return the ... In the general case a user can be a member of any number of ...
    (microsoft.public.windows.server.scripting)