Forum Discussion
Brendansmith
Jun 16, 2022Copper Contributor
Copying files to %appdata% with intune
HI All,
I have been trying to copy an .ini file though intune to C:\Users\%username%\AppData\Roaming\pyRevit
I have decided to go with PowerShell and below is the following script
New-item -itemtype directory -force -path $env:APPDATA\pyRevit
Copy-item -path "$psscriptroot\pyRevit_config.ini" -Destination $env:APPDATA\pyRevit
Return 0
below is my Install command in intune
powershell.exe -executionpolicy Bypass .\CopyFiles.ps1
Now this works outside of intune but I can not get it to work with intune if anyone could help me i would be appreciative
Regards
Brendan
@
I figured it out in the program it has to be set to user
- Jannik_ReinhardIron ContributorHey Brendan,
did you activate the option "Run this script using the logged on credentials"?- BrendansmithCopper Contributor
Jannik_Reinhard I'm running it as a win32 app, Is it not possible to do it that way.
- Jannik_ReinhardIron Contributor
Okay sorry I understood that this is a Powershell script not a win32 app. Did you set the install behaviour to the user or to the system?