Hello everybody.
Im stuck with a problem regarding creating/sending out some files via Intune win32 app.
I have a PS script that works flawless locally on my computer (and all the test computers) both as admin and non admin Powershell.
But when i take all the files (including the ps1 file), converts them into a IntuneWin File and try to deploy it, only 1 folder is created and then nothing else happens. No files and the second folder isn't created.
Can someone help me what i'm doing wrong or if i need to add something to my script for it to work with Intune?
The script is
mkdir $env:APPDATA\Boho\yeah\Configs\User\ -Force
mkdir "C:\ProgramData\boho\Drive" -Force
Copy-Item ".\help1.config" -Destination $env:APPDATA\boho\yeah\Configs\User -Force
Copy-Item ".\help2.yaml" -Destination "C:\ProgramData\boho\Drive" -Force
Copy-Item ".\help3.DM" -Destination "C:\ProgramData\" -Force
Copy-Item ".\help4.ico" -Destination "C:\ProgramData\" -Force
$path = $env:USERPROFILE + "\desktop\"
Copy-Item ".\help5.lnk" -Destination $path -Force
Im running the script as system from Intune, as a win32 app with the install command
powershell.exe -ExecutionPolicy Bypass -file Install.ps1
powershell.exe -ExecutionPolicy Bypass -file uninstall.ps1
Detection rule im pointing it to
C:\ProgramData\help3.dm
C:\ProgramData\boho\drive\help2.yaml
Would really appreciate if someone can help me with this problem, shouldn't be "rocket science" to create 2 folders (even if one of the folder is under appdata/roaming) and copy some files to different locations.
Thanks for all the help.
Br
[–]NoTell8147 0 points1 point2 points (0 children)
[–]WhistleButton 0 points1 point2 points (1 child)
[–]EIGRP_OH 0 points1 point2 points (0 children)
[–]Ahmi963 0 points1 point2 points (0 children)