copy folder incl. permissions from fileshare to program files

Topics: Archive - General
Sep 23, 2014 at 8:51 AM

can I use psappdeploy script to copy an empty folder from a network share to local C:\program files (x86)

I've tried sooo many ways and it never seems to bring permissions over..

I'm really hoping for some help!

I tried this for instance:
copy-item -path "$path\PDF" -destination "C:\Program Files (x86)\SonWin\SonWin Billing\" -force
    copy-item -path "$path\temp" -destination "C:\Program Files (x86)\SonWin\SonWin Billing\" -force
    (Get-Item "\\server\programmer\sw\Inst\Filer som skal kopieres ved install\PDF").GetAccessControl() | Set-Acl -Path "C:\Program Files (x86)\SonWin\SonWin Billing\PDF"
    (Get-Item "\\server\programmer\sw\Inst\Filer som skal kopieres ved install\temp").GetAccessControl() | Set-Acl -Path "C:\Program Files (x86)\SonWin\SonWin Billing\temp"
Sep 29, 2014 at 8:55 PM
If you need it, use RoboCopy with /SecFix (see

If I was the TK Devs though, I would not make it part of the the TK.
Usually you want the file to INHERIT the perms of the destination folder.
Oct 2, 2014 at 6:22 PM
Also, check out this interesting project that has created a clone of RoboCopy in PowerShell: