Recently we where moving folder and shares from one server to another. We need to confirm that the folder and permissions were the same on both the old and new share.
To do this I used PowerShell to export the pre and post move permissions and compare the results.
The two commands to get most of the information will be Get-ChildItem and Get-Acl. The only part of the scripts that will need to be changed is the the export file name to give it a custom name.
Below is the link to full script I will be using.
To run the script there will be two mandatory parameters and the command should look like the below. (If you want to look up all subfolders also then just change line 14 and add -Recurse to Get-ChildItem command)
.\Get-FolderPermissions.ps1 -FolderPath \\lab-host01\sources -ExportPath D:\Scripts\Folder_Permissions\Export