Last active
May 13, 2020 13:16
-
-
Save turboBasic/8933fbb45930806508e6e523d675959c to your computer and use it in GitHub Desktop.
Invoke complex commands from #powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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