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.
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
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
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.