Skip to content

Hyper-V VM: look for passthrough disks that are likely Offline USB (SSD/NVMe) drives#349

Closed
skyblaster wants to merge 1 commit intoOSDeploy:masterfrom
skyblaster:Invoke-SelectUSBDisk-patch
Closed

Hyper-V VM: look for passthrough disks that are likely Offline USB (SSD/NVMe) drives#349
skyblaster wants to merge 1 commit intoOSDeploy:masterfrom
skyblaster:Invoke-SelectUSBDisk-patch

Conversation

@skyblaster
Copy link
Contributor

@skyblaster skyblaster commented Feb 11, 2026

  • Add an if/else block to the Get-USBDisk function and use the Test-IsVM function to detect when we are working inside a VM
  • If working inside a VM, use Get-OSDDisk -MediaType SSD to detect additional offline/passthrough host drives

**This patch has only been tested with Hyper-V. Please test with other hypervisors.
**This only works with SSD/NVMe USB enclosures. Standard USB flash drives are typically not able to be put offline in diskmgmt.msc

Closes #348

@skyblaster skyblaster marked this pull request as draft February 15, 2026 17:06
@skyblaster skyblaster closed this Feb 16, 2026
@skyblaster skyblaster deleted the Invoke-SelectUSBDisk-patch branch February 16, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add detection of Offline drives in Hyper-V

1 participant