Skip to content

Instantly share code, notes, and snippets.

@turboBasic
Last active May 13, 2020 13:16
Show Gist options
  • Save turboBasic/8933fbb45930806508e6e523d675959c to your computer and use it in GitHub Desktop.
Save turboBasic/8933fbb45930806508e6e523d675959c to your computer and use it in GitHub Desktop.
Invoke complex commands from #powershell
$PathToOscdimg = "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\"
$BootData = '2#p0,e,b"{0}"#pEF,e,b"{1}"' -f "$ISOMediaFolder\boot\etfsboot.com", "$ISOMediaFolder\efi\Microsoft\boot\efisys.bin"
$Arguments = @{
FilePath = "$PathToOscdimg\oscdimg.exe"
ArgumentList = @(
"-bootdata:$BootData",
'-u2',
'-udfver102',
"$ISOMediaFolder",
"$ISOFile"
)
PassThru = $True
Wait = $True
NoNewWindow = $True
}
$Proc = Start-Process @Arguments
# $Proc = Start-Process -FilePath "$PathToOscdimg\oscdimg.exe" -ArgumentList @("-bootdata:$BootData",'-u2','-udfver102',"$ISOMediaFolder","$ISOFile") -PassThru -Wait -NoNewWindow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment