Forum Discussion
Chris_White_81
Sep 27, 2022Copper Contributor
Copy a OVPN file in Powershell from Intune
Sounds easy, my powershell script works fine if i run it on my machine, it copies the file into the %USERPROFILE%\OpenVPN\config folder. Its packaged up using the Intunewinapp program, but when i put...
Josh_MHat
Jan 08, 2025Copper Contributor
Is the script running in the user context or in system context?
When you run a script as the system account via Intune, the $env:USERPROFILE environment variable points to the "C:\Windows\System32\config\systemprofile" directory.
This is because the script is executed in the context of the system account, not a specific user account.