Forum Discussion
AB21805
Apr 21, 2021Bronze Contributor
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 ...
- Apr 22, 2021Hi 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
AB21805
Jul 15, 2022Bronze Contributor
New-Item -Path "c:\Documents\Studio one5\" -Name "Sounds" -ItemType "directory" -force
New-Item -Path "c:\Documents\Studio one5\" -Name "add ins" -ItemType "directory" -force
Copy-Item -Path "Studio one5\*" -Destination "C:\Documents\studio one5\" -Recurse -force
AB21805
Jul 15, 2022Bronze Contributor
There the locations however I also need to move the content into them via script
I want this to be in all users documents on each user account
Thanks in advanced
I want this to be in all users documents on each user account
Thanks in advanced
- AB21805Jul 28, 2022Bronze ContributorHi Rudy,
This script seems to only go into public documents still? I have tried the below too however this goes into each documents for all users / public folder is their a script to allow just the logged on user as putting into all takes up way to much space
New-Item -Path "C:\users\*\Documents\" -Name "Studio One" -ItemType "directory" -force
$profs=Get-ChildItem C:\Users\
Foreach($prof in $profs){
copy-item "Studio One\*" "c:\users\$prof\Documents\Studio One" -Force -Recurse
}
Thanks in advance - AB21805Jul 20, 2022Bronze ContributorThank you!!
- Jul 20, 2022$Source = '.\studio one\*'
$Destination = 'C:\users\*\documents'
Get-ChildItem $Destination | ForEach-Object {Copy-Item -Path $Source -Destination $_ -Force -Recurse} - AB21805Jul 20, 2022Bronze Contributor
- AB21805Jul 20, 2022Bronze Contributor
I have tried the wild card "*" and I get errors:
If I use "All Users" this gets the folder/content sent to the public documents rather than users documents
Any ideas?
- Jul 15, 2022You could use a wildcard ?
> new-item -path c:\users\*\documents -name "Studio one5" -ItemType "directory" -force
copy-item "Studio one5\*" -Destination "C:\users\*\Documents\studio one5\" -