Intune - Window app (win32), powershell script to copy file the the logged on users profile failing

Copper Contributor

Intune - Window app (win32), a simple powershell script to copy file the the logged on users profile.
I have a simple powershell script to copy a couple of files that i want to copy to the logged on users profile and  it fails (have tried using both %appdata% and $env:APPDATA for the path. The script run fine when run as the user on their computer but in Intune it keeps failing ( windows error 0x80070001 ).
This must be a pretty common and simple task so why is it failing.
Am I doing this wrong, if there is a better way?

1 Reply