Forum Discussion

AB21805's avatar
AB21805
Bronze Contributor
Apr 21, 2021
Solved

Creating a folder containing multiple files and sending to devices via intune

Hi all,    I desperately need some help! And just thought Id post on here to see if someone can help! I need to create a folder on client machines in the c drive (Folder name: Spanish Games) which ...
  • Rudy_Ooms_MVP's avatar
    Apr 22, 2021
    Hi it would look like this

    c:\intunepackage\
    Inside this folder you need to create a folder "spanishgames"
    Copy everything you have inside this folder
    Create a powershell script (install.ps1) inside the c:\intunepackages\ folder
    Inside the script,

    -first create a new directory where the files need to be copied to (destination)

    New-Item -Path "c:\" -Name "SpanishGames" -ItemType "directory" -force

    -Then create a command to copy everything to the folder you you created

    Copy-Item -Path "spanishgames\*" -Destination "C:\spanishgames" -Recurse -force

    Now we have everything in place... open the intunewinapptool and specify the folder c:\intunepackages and the setup file: install.ps1

    Upload it to intune and specify the c:\spanishgames folder as the detection rule

    That should be it

Resources