Microsoft Intune is a very powerful tool for Azure administrator and can be used to perform a large number of tasks. You can set policies, deploy packages, run PowerShell scripts on azure domain-joined devices. This post is related to copy files or folders to the user's desktop using Intune. I am creating a PowerShell script and batch file then I will convert them to Win32 Intune package for deployment.
Push Files via Intune
Step 1: Create a package folder
Create a folder named "package" in C drive.
Step 2: Copy your source file
Copy the file or folder which you want to copy to the desktop using Intune into the package folder.
Step 3: Create a PowerShell script
Create a PowerShell script as below with file name PSscript.ps1:
$PSScriptRoot = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
$Source = "$PSScriptRoot\name of file or folder"
$Destination = "C:\Users\Public\Desktop\"
Copy-Item -Path $Source -Destination $Destination -Recurse -Force
Step 4: Create a batch file
Create a batch file Install.cmd:
@ECHO OFF
SET ThisScriptsDirectory=%~dp0
SET PowerShellScriptPath=%ThisScriptsDirectory%PSscript.ps1
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%PowerShellScriptPath%'"
Step 5: Download the packaging tool
Download Microsoft Win32 Content Prep Tool.
Step 6: Create a Win32 Intune package
PS C:\IntuneAppsWinAppsUtil> .\IntuneWinAppUtil.exe
Please specify the source folder: C:\Temp\package
Please specify the setup file: Install.cmd
Please specify the output folder: C:\Temp\package
Do you want to specify catalog folder (Y/N)? n
Step 7: Sign in to the Azure portal
Sign in to the Azure portal and select the Intune blade.
Step 8: Navigate to Client apps
Select Client apps --> Apps --> Add.
Step 9: Select app type
Select app type "Windows app (Win32)".
Step 10: Upload the package
Select the app package file which we created in step 6.
Step 11: Configure the program tab
On the program tab, follow the below screenshot:

Step 12: Configure requirements

Step 13: Configure detection rules

Step 14: Assign to a group

Step 15: Review and create
On the Review + create tab, create the package.
I hope this small tutorial will help you to copy files or folders to workstations using Intune.
