Setting the below $usbDriveLetter
variable to automatically find the USB drive letter, and using that variable to open an image on the USB doesn't work. It literally prints "G:\image.png" in the cmd.
$usbDriveLetter = (gwmi win32_volume -f 'label=''USB_NAME_HERE''').Name;
"$usbDriveLetter" + "image.png"
But if I don't use a var and make "G:\" static in the PowerShell script, the image opens just fine.
G:\image.png
So what am I doing wrong here? How do we dynamically open images using ps1 scripts?