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

Get-DiskToUse listing main hard drive as an option #51

Open Wobblagated opened 1 year ago

Wobblagated commented 1 year ago

image

The Get-DiskToUse function is listing my main hard drive as an option. After digging in as to why, my hard drive bustype is set to RAID. The function only filters out SATA and NVMe. The line below should be changed. //From $diskList = Get-Disk | Where-Object { $_.Bustype -notin @('SATA', 'NVMe') } //To $diskList = Get-Disk | Where-Object { $_.Bustype -notin @('SATA', 'NVMe', 'RAID') } //Or for USB only $diskList = Get-Disk | Where-Object -FilterScript {$_.Bustype -Eq "USB"}

Thank you for your time.

tabs-not-spaces commented 1 year ago

Seems like an easy PR?

On Thu, 10 Nov 2022, 1:10 am Wobblagated, @.***> wrote:

[image: image] https://user-images.githubusercontent.com/52647746/200849422-a37abc63-4673-4ca3-9d8e-044f24cd4023.png

The Get-DiskToUse function is listing my main hard drive as an option. After digging in as to why, my hard drive bustype is set to RAID. The function only filters out SATA and NVMe. The line below should be changed. //From $diskList = Get-Disk | Where-Object { $

.Bustype -notin @('SATA', 'NVMe') } //To $diskList = Get-Disk | Where-Object { $.Bustype -notin @('SATA', 'NVMe', 'RAID') } //Or for USB only $diskList = Get-Disk | Where-Object -FilterScript {$_.Bustype -Eq "USB"}

Thank you for your time.

— Reply to this email directly, view it on GitHub https://github.com/tabs-not-spaces/Intune.USB.Creator/issues/51, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIDA4LKLZCZKEOCNCDY24OTWHOWEXANCNFSM6AAAAAAR3PEMVE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rvdwegen commented 1 year ago

@Wobblagated I'm wondering how USB HDD/SSDs show up for this command.