ini=nul /log=script.log /script=script.tmp /parameter // c:\myfile.txt NET assembly.įor simple modifications, you can pass the variable parts of the script from command line: For example you may want to operate it with different file each time.įor tasks involving more complex modifications, conditional processing, loops or other control structures, you should better use the WinSCP. IF NOT EXIST “%userprofile%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads\thump.png” copy /Y “%programdata%\MDMManagedApps\CRSBrandTemplates\Teams\Thump.png” “%userprofile%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads”įinally package the 2 batch files and Scheduled task XML file into an IntuneWin app and create a Win32 package.You may want to modify the script automatically. IF NOT EXIST “%userprofile%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads” MD “%userprofile%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads” Script #2 – Runs at user logon and copies the file thump.png to uploads folder if it does nor exist SCHTASKS /create /XML “%programdata%\MDMManagedApps\Scripts\TeamsBackground.xml” /TN TeamsBackgroundĭel “%programdata%\MDMManagedApps\Scripts\TeamsBackground.xml” Tasklist /FI “IMAGENAME eq TeamsBackground ” 2>NUL | find /I /N “TeamsBackground”>NUL \CRSTeamsBackground.xml “%programdata%\MDMManagedApps\Scripts\TeamsBackground.xml” \CallMSTeams.cmd “%programdata%\MDMManagedApps\Scripts\CallMSTeams.cmd”Ĭopy /Y. \thumb.png “%programdata%\MDMManagedApps\Teams”Ĭopy /Y. IF NOT EXIST “C:\ProgramData\MDMManagedApps\Scripts” MD “C:\ProgramData\MDMManagedApps\Scripts”Ĭopy /Y. IF NOT EXIST “C:\ProgramData\MDMManagedApps\BrandTemplates\Teams” MD “C:\ProgramData\MDMManagedApps\BrandTemplates\Teams” This is the script that will be called by the Win32 app. Script #1 – Copies the source files (thump.png) to a cache folder on the client device and creates a scheduled task that will run at user logon. You can try the following approach that makes us of a scheduled task: Example: Xcopy C:\source C:\temp /E /H /C /I If you want to copy a folder not only single files, use the xcopy command on your cmd file. Sync the managed device from the Endpoint Manager console and wait for the files to populate on the location.įollow the steps above to test it on your end and don’t forget to post your questions, comments and results! ♥ Tip The path to place the files, File or Folder to add the name of at least one file and the Detection method select file or folder exists. This should be the name of the cmd file.Ĥ. Specify the install and uninstall command. Upload the intune.win package and use the commands below:ġ.Select the intunewin package and add the app informationĢ. Please specify the output folder: C:\Users\gianelliadmin\Documents\ImportantFilesĭo you want to specify catalog folder (Y/N)?NĬreate a Windows (Win32) app in Endpoint Manager Please specify the setup file: copyFiles.cmd Please specify the source folder: C:\Users\gianelliadmin\Documents\ImportantFiles Run the utility using the directories accordingly.\IntuneWinAppUtil.exe For this example, the utility was located in C:\Temp\Microsoft-Win32-Content-Prep-Tool-master\ Run powershell as admin and move to the directory where IntuneWinAppUtil was extracted to. For this example, we used the folder: C:\Users\gianelliadmin\Documents\ImportantFiles You can download it here.Ĭreate the output folder for the. Run the Intune Utility to prepare the intunwin packageĭownload the Microsoft Intune Win32 App Upload Prep Tool and extract it to C:\Temp\ IntuneAppTool. \IOS-iPadOS_EnrollmentTypes_.jpg %systemRoot%\ \Windows_AzureADRegistration.pdf %systemRoot%\Ĭopy /Y. \Windows_EnrollmentTypesIntune.pptx %systemRoot%\Ĭopy /Y. The copyFiles.cmd file contains the following lines:Ĭopy /Y. Next, create a cmd file with the instructions to copy all the files previosuly added and place it on the same folder.įor our deployment we used the files as shown below: Prepare a folder and add all the necessary files that you want to copy to managed devices. Please keep reading and find out our results!♥ The way we achieved it was, deploying a Win 32 package with the neccesary docs and a cmd file. Hello Readers! I was working with a client last week who was looking to place some folders and files on a specific location (C drive) on their managed devices.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |