I am an avid Linux user who is being made to use Windows for work. I was given the go-ahead to install WSL2 and Ubuntu on the work computer. I would like to burn a bootable USB using dd in WSL2, but haven't been able to figure out how to get the device since lsblk doesn't supply the external block devices connected to the computer. I understand I could do it in something like Rufus, but since it's a work computer I'm not allowed to get anything like that on the computer.
There is only one other question like this on StackOverflow, but it is closed and did not give an answer. However it did give a clue for me to start looking for the physical device name. Using that clue, I have figured out the answer to this question and wanted to share it since there are no answers I could find not only on StackOverflow, but anywhere else on the internet.
PowerShell:
# I ran this command to get the DeviceID of my USB Thumbdrive (Mine came out to be
# \.\\PHYSICALDRIVE 5, but yours may vary)
Get-WmiObject Win32_diskdrive | Select Caption,DeviceID,InterfaceType,Size | Where-Object {$_.InterfaceType -eq "USB"}
Ubuntu 20.04 Terminal:
# After I got the physical drive number from powershell (as I would do using lsblk in Linux) I
# formatted the drive using mkfs to ensure it would work before trying to use dd.
sudo mkfs.vfat -I \\.\PHYSICALDRIVE5
# After a successful format, I was able to run dd as normal
sudo dd if=path/to/my/file.iso of=\\.\PHYSICALDRIVE5 status=progress