Scripts/LinuxAutoinstallation.ps1


$IsoFileSource = "C:\Users\JaapTerlouw\Downloads\ubuntu-22.04-live-server-amd64.iso"
$IsoFileOutput = "F:\WindowsImaging\ISO\ubuntu-22.04-Autoinstall.iso"
$IsoTempFoler = "D:\Temp\ubuntu-22.04-Autoinstall"


$DI = Mount-DiskImage $IsoFileSource

$MountedDriveletter = $DI | Get-Volume | Select-Object -ExpandProperty Driveletter

Robocopy "$($MountedDriveletter):\" $IsoTempFoler /MIR /NFL /W:1 /R:1

Dismount-DiskImage $IsoFileSource | Out-Null