Deploy file to workstations with Microsoft Intune

0

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

Let’s start.

Step 1: Create a folder named  package in C drive

Step 2- Copy the file or folder which you want to copy to the desktop using Intune.

Step 3- 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 Install.cmd

@ECHO OFF
SET ThisScriptsDirectory=%~dp0
SET PowerShellScriptPath=%ThisScriptsDirectory%PSscript.ps1
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& ‘%PowerShellScriptPath%'”

Step 5- 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 and select the Intune blade.

Step 8-  Select Client apps –> Apps –Add

Step 9- Select app type “Windows app (Win32)”

Step 10 – Select the app package file which we created in step 6.

Step 11- On the program tab, follow as below screenshot

Copy file using intune

Step 12- Requirement tab

Add app using Intune

 

Step 13- Detection rules tab

Intune App detection rules

Step 14- Assignments

Intune Group Assignment

Step 15- Review + create tab. Create the package.

I hope this small tutorial will help you to copy files or folders to workstations using Intune.

Leave A Reply

Your email address will not be published.