Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Need help with folder access script and output file.

$
0
0

Hi, I am writing a script that will give me list of groups that have access to specific folder. The script that I currently have is giving me the list of all users that have access to a folders but the output file is one file and I would like it to be separate files based on the folder path that I am providing through list.

Here is what I am using currently:

Powershell
$InputFile="C:\Temp\path.txt"$OutputFile="C:\Temp\FolderPermissions.csv"$FolderList=Get-Content$InputFileForEach($Folderin$FolderList){$Permissions=(Get-ACL$Folder).access$Report+=$Permissions}$Report|Select-ObjectIdentityReference,FileSystemRights,IsInherited|Export-CSV$OutputFile-NoTypeInformation



Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>