• Status: Solved
  • Priority: Medium
  • Security: Private
  • Views: 78
  • Last Modified:

Verify if domain account can access 100s of file shares.

Hi All

Does anyone have a Powershell script to share that would do the following ?

1) gets the path form a text file .. example below .. with 100s  of paths
\\server1\share1
\\server2\share2
\\server9912\share99
2) checks if a set of domain credentials can access each share.
3) output CSV with each path and if the account was able to access the share or not .
0
MilesLogan
Asked:
MilesLogan
  • 2
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Are you assigning permissions directly to the account or are you assigning the account to groups which should have access... I'm trying to picture a scenario where a system is setup properly and this must be done...
0
 
MilesLoganAuthor Commented:
so basically , I want to test if the account which is not added to any groups can access any of those shares.
Some of those shares are incorrectly configured and open to everyone , so if the account can access it , then its set up incorrect .

similar to

Test-Path \\share\folder1
when it returns True or False
0
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
You can do a efficetive permission report via the Get-PacEffectiveAccess function
Get-PacEffectiveAccess c:\folder -Principal Username

Open in new window

https://social.technet.microsoft.com/Forums/windowsserver/en-US/ad80d5df-5a34-4db5-996f-59a61855a105/how-to-programmatically-get-effective-permissions-from-share-and-ntfs?forum=winserverpowershell
https://gallery.technet.microsoft.com/scriptcenter/PowerShellAccessControl-d3be7b83
1
 
MilesLoganAuthor Commented:
Thank you for the link
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

Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

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