Creating a bootable USB stick for Windows installation using diskpart

For the other way around, creating a bootable ISO from a USB:
https://aatayyab.wordpress.com/2016/05/09/convert-bootable-usb-to-an-iso-image/
might also be useful: https://www.dell.com/community/Windows-10/Windows-10-rebootable-iso/td-p/5030000

Cloned from: https://blog.bramp.net/post/2008/06/23/create-bootable-windows-server-2008-usb-stick/

Start diskpart

DISKPART> list disk

     Select the USB device from the list and substitute the disk number below
     when necessary

DISKPART> select disk 1
DISKPART> clean
DISKPART> create partition primary
DISKPART> select partition 1
DISKPART> active
DISKPART> format fs=fat32
DISKPART> assign
DISKPART> exit

xcopy X:\*.* /s/e/f Y:\

     where X:\ is your mounted image or physical DVD and Y:\ is your USB
     device

Diskpart info: http://www.computerhope.com/diskpart.htm
See also: USB install media with WIM file larger than 4GB