PowerShell in Intune - How to Copy file(s) (1/3)

preview_player
Показать описание
In this short video series about three different ways of using PowerShell in Intune, we start with how to copy file(s) by using PowerShell copy files bundled up in a Win32 app (.intunewin file).

Links:

Script:
### Copy CMtrace file into c:\program files\CMtrace
### author: John Bryntze
### date: 18th October 2022

# Variables
$JBNScriptRoot = Split-Path -Path $MyInvocation.MyCommand.Path
$JBNCMtraceDir = "c:\program files\CMtrace"

if(!(test-path -Path $JBNCMtraceDir))
{
New-Item -ItemType Directory -Path $JBNCMtraceDir
}

Рекомендации по теме
Комментарии
Автор

I am a sysadmin and I must say this is an excellent tutorial on YouTube, Big thanks and please keep making more video like this!

XianLi-mz
Автор

The faster the better! :) Thank you for creating this videos, they are perfect! :)

tyleroconnellt
Автор

Hi Sir!
Once again, good content and explained easily. I always learn new things from your tutorials.
Keep the good job!

rashkaViking
Автор

Thank you so much for responding to my comment and creating this video.

Andy_h
Автор

As always great content John! Thank you!

iamsam
Автор

Thank you very much! Great! I only adapted the copy to environment variables.

sangoku
Автор

Hi another great video. Could you please do one video on network printer deployment through powershell in intune.

shankhan-xmyp
Автор

Great video will follow along on my own intune tenant :)

XwolfBane
Автор

Great video thank you. Question, how do you become aware of all the features available for Intune and products. Are there some resources that you are able to share that I can reference?

ecuasteelo
Автор

Hello!,
Great video, i just have a question related with the Path where you want to copy the file or files.
If this path needs to be copy in a User folder, Example: (C:\Users\X\Appdata\Roaming) where x is the name of the user, what is the best variable for that? and also in the detection rules?

boyoscar
Автор

its easy to understand thank you for the excellent content. quick info. can we also deploy Multiple pdf file using Intune

vaigandlakiran
Автор

I got error when I install on computer from company portal. Where can I find error ?

jojoka
Автор

It looks easy but I cannot get it to work, always failed on me. The PS script works locally but it does not work with Intune

jamesjames
Автор

I have a question.. is there a way to copy a file located in a Sharepoint hub?

TanuchiSacin
Автор

If you needed to copy a file from a specific location on each InTune device, where would you store these files?

kenlang
Автор

Hello, very nice tutorials. Is it possible to copy it directly in a directory without going in the company portal ?

ml
Автор

and if i need to update an existing folder ? i have an existing folder and i need to update its content with a new files weekly, is this effective for my situation ?

mohammedtharwat
Автор

How to u force the app to install automatically?

joek
Автор

is there anyway i can upload a .intunewin file to intune via a http call?i need to automate the procedure

crunchraven
Автор

Can you also make a video on how to deploy app using winget with powershell scripts? For me it is not working, but maybe it is not possible. I wrote a script that first downloads the latest winget if not installed already, then it installs an app with winget command in the script. Then I deployed it as win32 app (packaged only the ps1 script. But maybe I am missing something so I am wondering how you would do this. If it works, we can then simply install all apps on winget and update then with remediation scripts as well and the app ID for it would then always be the same between install en remediation. perfect automation I would say :)

marvnl