Guest Keith_7 Posted November 7, 2019 Posted November 7, 2019 I am still a newbie at PowerShell. My end result at this time is to find permissions on files and folders, and modified date into a csv file for all of them on a windows 2016 server. I found the PowerShell below that gives me the permissions but no modified date. Is there a way to insert a added command to do that? $FolderPath = dir -Directory -Path "C:\data" -Recurse -Force $Report = @() Foreach ($Folder in $FolderPath) { $Acl = Get-Acl -Path $Folder.FullName foreach ($Access in $acl.Access) { $Properties = [ordered]@{'FolderName'=$Folder.FullName;'AD Group or User'=$Access.IdentityReference;'Permissions'=$Access.FileSystemRights;'Inherited'=$Access.IsInherited} $Report += New-Object -TypeName PSObject -Property $Properties } } $Report | Export-Csv -path "C:\Temp\FolderPermissions.csv" Continue reading... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.