Use a Win32 app to Copy Files and Folders

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:

The source folder.

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.

About the author

Johan Arwidmark

0 0 votes
Article Rating
Notify of
Oldest Most Voted
Inline Feedbacks
View all comments
10 months ago

Thanks for the information.Version001.txt 

What was the content of the

1 year ago

It works !! Great, thanks a lot

Ryan M
Ryan M
1 year ago

I used this today as part of a kiosk setup. Very handy, thanks Johan!

1 year ago

Thank you. Great guide. It works.