I've got a PowerShell script to copy a bunch of files to a directory in Program Files (x86)
. The script itself loops through a list of files and calls
Copy-Item -Path $src -Destination $dst -Verbose -Confirm:$false -Force
for each one, but when it comes to overwriting a file, I get an access denied error on the path. The PowerShell script is run from a batch file which I'm running as administrator, so I'm not sure why this is failing. I've checked all the paths in question and they're all correct.
The script is running on Windows Server 2012, and ran successfully when I last ran it a few months ago. No user permissions have changed since then.