private/BootMedia/Steps/Step-BootImageAppCurl.ps1
|
#Requires -PSEdition Core function Step-BootImageAppCurl { <# .SYNOPSIS Copies curl.exe from the running OS into the mounted WinPE image. .NOTES Author: David Segura Version: 0.1.0 #> [CmdletBinding()] param () $MountPath = $global:BuildMedia.MountPath $SourceCurl = "$env:SystemRoot\System32\curl.exe" $DestinationCurl = Join-Path $MountPath 'Windows\System32\curl.exe' Write-OSDeployCoreProgress 'Step-BootImageAppCurl' if (-not (Test-Path -Path $SourceCurl)) { Write-Warning "curl.exe not found at $SourceCurl" return } Write-OSDeployCoreProgress "Copying curl.exe from $SourceCurl" Copy-Item -Path $SourceCurl -Destination $DestinationCurl -Force -ErrorAction SilentlyContinue } |