Managed Business Technology Solutions Website Development & Hosting Virus Removal & Cleanup System Restoration & Data Recovery
Vipre Internet Security
Home > Knowledge Base

Add a Passthru / Physical Hard Drive to a VM with PowerShell in Hyper-V 2012

  1. Open command prompt & open diskpart
    DISKPART
    list disk
    select disk #
    offiline disk

  2. Ctrl+C to leave diskpart

  3. Enter PowerShell
    powershell

  4. Hyper-V 2012
    Get-VMScsiController –VMName VMNAMEGOESHERE –ControllerNumber SCSICONTROLLERNUMBER | Add-VMHardDiskDrive –DiskNumber DISKNUMBER

    Hyper-V 2012 R2
     
    Add-VMHardDiskDrive -VMName VMNAMEGOESHERE -ControllerType SCSI -DiskNumber DISKNUMBER  -Passthru
Ting - Mobile that makes sense