Hi,
I have been struggling to find a solution to run a powershell script that copies a file from a share on a server and copies it into the a directory on the C drive.
It works when running powershell ise as administrator however when you run the script without doing that it gives the error that it dosent have access rights to the destination it is trying to copy the file to. I have tried adding the SetExecution Policy to bypass and unrestricted with no luck. This is being pushed from SCCM. Essientally what this file is a licence file (xml)
Please see the attached script that works fine when you run powershell as administrator.
Any help would be greatly appreicated...
Craig