Here is a quick guide to create a Win32 app in Intune to copy som files and folders to your clients. In the example I had some tools I wanted to copy to all my lab machines and use Microsoft Intune to do so.
Source Folder
In this example I copied my files and folders to a source folder named E:\Demo\Intune\Win32Apps\Tools\Source. In addition to the Install.ps1 script that would copy the files, I also added in a Version001.txt script that I could use as my detection method in Intune, and an Uninstall.ps1 script that would delete the folder if I uninstalled the app.
You can download the sample scripts here: https://github.com/DeploymentResearch/DRFiles/tree/master/Scripts/Intune/Win32AppToCopyFiles

The Package
I used the Content Prep Tool to create the package needed for Win32 Apps in Intune. I used the following command:
.\IntuneWinAppUtil.exe -c "E:\demo\Intune\Win32Apps\Tools\Source" -s Install.ps1 -o "E:\demo\Intune\Win32Apps\Tools\Package" -q

Creating the Win32 App in Intune
When creating the Win32 App in Intune, I used the following settings:
Name: ViaMonstra Lab Tools
Description: ViaMonstra Lab Tools
Publisher: ViaMonstra
Install Command line: powershell.exe -ExecutionPolicy Bypass -File Install.ps1
Uninstall Command line: powershell.exe -ExecutionPolicy Bypass -File Uninstall.ps1
File detection rule: Version001.txt in C:\Tools
Assignment: An Azure AD Group with my lab machines, assignment configured for foreground download.
Hi Johan,
Thanks for sharing this. Is there a way to hide the install and uninstall scripts so they are not visible within the folder or some other way of not copying the scripts as part of the package.
Sure, build a list of the files to copy first, and exclude the install.ps1 and uninstall.ps1 script.
It didn't help me. I followed the instructions but it is failing.
can you please suggest
Can you share the C:\Windows\Temp\ViaMonstraTools_Install.log ?
Thanks for the information.Version001.txt
What was the content of the
It works !! Great, thanks a lot
I used this today as part of a kiosk setup. Very handy, thanks Johan!
Thank you. Great guide. It works.