Summary: Learn how to easily automate commands by using DiskPart.exe.
How can I use Windows PowerShell to automatically run DiskPart.exe commands that I use to make bootable keys?
Store the commands you use in DiskPart.exe in a text file (runme.txt in this example), and run them automatically by adding the /s parameter:
DISKPART.EXE /s runme.txt
Note You must run DiskPart.exe as Administrator.