GET-ACL $Path | Select Path, Owner -expand access
where “$Path” could be a variable of the folder path or you can replace with the value like “c:\temp”
If you notice, the Path attribute has some unwanted value ‘Microsoft.PowerShell.Core\Filesystem’::’ To further format the output, we can modify the above command as:
DIR command switches have not been explored to the core. The DIR command not only lists all available files and directories in the current directory but also can show the last modification date and time, file size and lot more.
All we need to do is run the below command to find the owner of the folder
DIR /Q <Folder Path>
Add the /S switch to browse through the subdirectories and files
Add the /AD switch to list only the directories