Home All Groups Group Topic Archive Search About

Scruot to check user rights on folders/subfolders

Author
16 Feb 2009 7:54 AM
stefan
Hi,

I'm looking for a powershell script to check if theres a specified user
authorized on all subfolders and files in a directory...

I tried get-acl but I'm not a scripting guy...

Any help would be appreciated.

Author
16 Feb 2009 9:40 AM
Pegasus (MVP)
"stefan" <ste***@trash-mail.com> wrote in message
news:OSNn7uAkJHA.4880@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> I'm looking for a powershell script to check if theres a specified user
> authorized on all subfolders and files in a directory...
>
> I tried get-acl but I'm not a scripting guy...
>
> Any help would be appreciated.
>

The command cacls.exe "d:\Some Folder" /t | find /i "stefan" is a basic
method to give you this type of information. You must run it from a Command
Prompt. If you want something a little fancier then AccessEnum.exe might be
for you: http://technet.microsoft.com/en-us/sysinternals/bb897332.aspx.
Author
16 Feb 2009 12:52 PM
Al Dunbar
Show quote Hide quote
"Pegasus (MVP)" <I.***@fly.com.oz> wrote in message
news:%23uI6mqBkJHA.3760@TK2MSFTNGP03.phx.gbl...
>
> "stefan" <ste***@trash-mail.com> wrote in message
> news:OSNn7uAkJHA.4880@TK2MSFTNGP02.phx.gbl...
>> Hi,
>>
>> I'm looking for a powershell script to check if theres a specified user
>> authorized on all subfolders and files in a directory...
>>
>> I tried get-acl but I'm not a scripting guy...
>>
>> Any help would be appreciated.
>>
>
> The command cacls.exe "d:\Some Folder" /t | find /i "stefan" is a basic
> method to give you this type of information. You must run it from a
> Command Prompt. If you want something a little fancier then AccessEnum.exe
> might be for you:
> http://technet.microsoft.com/en-us/sysinternals/bb897332.aspx.

that will only show you on which folders a particular user has ACLs. Some
might be deny ACLs. Also, there might be folders he has no access to
(re-read the OP's question, he's looking for someone having access to all
folders), and he might have access through membership in a security group.

IMHO, without a bit more info from the OP, this could potentially be quite
complex.

/Al
Author
16 Feb 2009 12:52 PM
Al Dunbar
Show quote Hide quote
"Pegasus (MVP)" <I.***@fly.com.oz> wrote in message
news:%23uI6mqBkJHA.3760@TK2MSFTNGP03.phx.gbl...
>
> "stefan" <ste***@trash-mail.com> wrote in message
> news:OSNn7uAkJHA.4880@TK2MSFTNGP02.phx.gbl...
>> Hi,
>>
>> I'm looking for a powershell script to check if theres a specified user
>> authorized on all subfolders and files in a directory...
>>
>> I tried get-acl but I'm not a scripting guy...
>>
>> Any help would be appreciated.
>>
>
> The command cacls.exe "d:\Some Folder" /t | find /i "stefan" is a basic
> method to give you this type of information. You must run it from a
> Command Prompt. If you want something a little fancier then AccessEnum.exe
> might be for you:
> http://technet.microsoft.com/en-us/sysinternals/bb897332.aspx.

that will only show you on which folders a particular user has ACLs. Some
might be deny ACLs. Also, there might be folders he has no access to
(re-read the OP's question, he's looking for someone having access to all
folders), and he might have access through membership in a security group.

IMHO, without a bit more info from the OP, this could potentially be quite
complex.

/Al