SOLVED

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

%3CLINGO-SUB%20id%3D%22lingo-sub-2280496%22%20slang%3D%22en-US%22%3ECreating%20a%20folder%20containing%20multiple%20files%20and%20sending%20to%20devices%20via%20intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2280496%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20desperately%20need%20some%20help!%20And%20just%20thought%20Id%20post%20on%20here%20to%20see%20if%20someone%20can%20help!%20I%20need%20to%20create%20a%20folder%20on%20client%20machines%20in%20the%20c%20drive%20(Folder%20name%3A%20Spanish%20Games)%20which%20I%20then%20deploy%20a%20bunch%20of%20files%20to%20this%20folder%20I%20create%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20had%20a%20look%20and%20seems%20like%20I%20need%20to%20create%20a%20win32%20app%20container%20with%20all%20in%2C%20script%20and%20files.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20would%20I%20need%20to%20include%20in%20the%20script%20to%20get%20this%20to%20work%3F%20I%20have%20had%20a%20look%20at%20docs%20online%20but%20cant%20find%20one%20that%20deploys%20a%20folder%20and%20files%20too.%20I%20have%20found%20this%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fpariswells.com%2Fblog%2Fintune%2Fcopy-file-to-workstations-with-windows-intune%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpariswells.com%2Fblog%2Fintune%2Fcopy-file-to-workstations-with-windows-intune%3C%2FA%3E%26nbsp%3Bbut%20dont%20really%20understand%20some%20of%20it.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20great!!%20Thanks%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2280496%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Friday%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EConditional%20access%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Application%20Management%20(MAM)%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Device%20Management%20(MDM)%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESoftware%20Management%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2281245%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20a%20folder%20containing%20multiple%20files%20and%20sending%20to%20devices%20via%20intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2281245%22%20slang%3D%22en-US%22%3EHi%20it%20would%20look%20like%20this%3CBR%20%2F%3E%3CBR%20%2F%3Ec%3A%5Cintunepackage%5C%3CBR%20%2F%3EInside%20this%20folder%20you%20need%20to%20create%20a%20folder%20%22spanishgames%22%3CBR%20%2F%3ECopy%20everything%20you%20have%20inside%20this%20folder%3CBR%20%2F%3ECreate%20a%20powershell%20script%20(install.ps1)%20inside%20the%20c%3A%5Cintunepackages%5C%20folder%3CBR%20%2F%3EInside%20the%20script%2C%3CBR%20%2F%3E%3CBR%20%2F%3E-first%20create%20a%20new%20directory%20where%20the%20files%20need%20to%20be%20copied%20to%20(destination)%3CBR%20%2F%3E%3CBR%20%2F%3ENew-Item%20-Path%20%22c%3A%5C%22%20-Name%20%22SpanishGames%22%20-ItemType%20%22directory%22%20-force%3CBR%20%2F%3E%3CBR%20%2F%3E-Then%20create%20a%20command%20to%20copy%20everything%20to%20the%20folder%20you%20you%20created%3CBR%20%2F%3E%3CBR%20%2F%3ECopy-Item%20-Path%20%22spanishgames%5C*%22%20-Destination%20%22C%3A%5Cspanishgames%22%20-Recurse%20-force%3CBR%20%2F%3E%3CBR%20%2F%3ENow%20we%20have%20everything%20in%20place...%20open%20the%20intunewinapptool%20and%20specify%20the%20folder%20c%3A%5Cintunepackages%20and%20the%20setup%20file%3A%20install.ps1%3CBR%20%2F%3E%3CBR%20%2F%3EUpload%20it%20to%20intune%20and%20specify%20the%20c%3A%5Cspanishgames%20folder%20as%20the%20detection%20rule%3CBR%20%2F%3E%3CBR%20%2F%3EThat%20should%20be%20it%3C%2FLINGO-BODY%3E
Regular Contributor

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 I then deploy a bunch of files to this folder I create 

 

I have had a look and seems like I need to create a win32 app container with all in, script and files. 

 

What would I need to include in the script to get this to work? I have had a look at docs online but cant find one that deploys a folder and files too. I have found this: https://pariswells.com/blog/intune/copy-file-to-workstations-with-windows-intune but dont really understand some of it. 

 

Any help would be great!! Thanks in advance

1 Reply
best response confirmed by AB21805 (Regular Contributor)
Solution
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