• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

win script

Hi

I use Get-ChildItem to display folders in specific path
my question is how i can filter results  to display only folder that has deny access


thanks
0
ang3lus
Asked:
ang3lus
1 Solution
 
Chris DentPowerShell DeveloperCommented:

Depends a bit on what you want to see, but this will do it.
Get-ChildItem | Where-Object { (Get-Acl $_.FullName).Access | Where-Object { $_.AccessControlType -eq 'Deny' } } 

Open in new window

Cheers,

Chris
0
 
ang3lusAuthor Commented:
Thanks
the script work like charm
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now