Windows 10 permissions

RunAs Administrator:

REM Backup permissions of WindowsApps
icacls "%ProgramFiles%\WindowsApps" /save WindowsApps.acl

REM change owner to copy directory (it's a LOT of files!!!)
takeown /F “C:\Program Files\WindowsApps” /A /R

robocopy "c:\Program Files" s:\C_ProgramFiles /COPYALL /MIR /LOG:robocopy.txt /ZB /DCOPY:T /V /TEE

REM restore permissions
icacls "%ProgramFiles%" /restore WindowsApps.acl
RunAs Administrator:

cd some_directory
icacls * /t /q /c /reset
takeown /R /F *
icacls * /t /grant Everyone:F
cd ..
REM List all symbolic links and directory junctions
DIR /AL /S C:\

Junctions vs Directory symbolic link

icacls reference