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

Описание к видео PowerShell in Intune - How to Copy file(s) (1/3)

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).

To see the whole series check here:    • Intune - Three ways of using PowerShe...  

Links:
Microsoft Win32 Content Prep Tool https://github.com/Microsoft/Microsof...

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
}

copy-item $JBNScriptRoot\CMTrace.exe -Destination $JBNCMtraceDir

Комментарии

Информация по комментариям в разработке