tabs-not-spaces / Intune.USB.Creator

A module containing tools to assist with the creation of a bootable WinPE USB used to provision devices for enrollment to Intune.
GNU General Public License v3.0
131 stars 43 forks source link

Update device detection #47

Open ajkenah opened 2 years ago

ajkenah commented 2 years ago

Update USB device detection to be based on the device which the invoked script is hosted on. This removes the requirement for the Get-USBDeviceId Function which assumes that the USB device is device[0] if multiple devices exist.

ajkenah commented 2 years ago

Hi @tabs-not-spaces I hope you don't mind me proposing some optimisations to your code base. :) These changes came about because I was trying to create a bootable VHDX file as per your YouTube video for testing purposes, but it was failiing because there wasn't a USB device. So I took a look through the code for the Invoke-Provision.ps1 script and came up with this optimisation. Please feel free to reject or we can discuss further if you like.