Last active
November 24, 2021 19:47
-
-
Save nuryslyrt/b43698bdeb2873ec0e8a8be7a87e455d to your computer and use it in GitHub Desktop.
Everyone Access Check in File System
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Shares = Get-ChildItem "C:\test123" -Recurse | Get-ACL | ?{$_.AccessToString -match "Everyone"} | %{($_.PSPath -split '::')[1]}; | |
foreach($Share in $Shares) { | |
findstr /r "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*" $Share; | |
findstr /rs "pass" $Share; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment