none
Disconnect-VirtualDisk error - help please RRS feed

  • Question

  • This is from PowerShell ISE under Windows 8.1

    Could someone tell me what is the error in the Disconnect-VirtualDisk command please. I cannot see anything wrong with it.

    Dave

    PS C:\WINDOWS\system32> Get-VirtualDisk
    
    FriendlyName              ResiliencySettingName     OperationalStatus         HealthStatus              IsManualAttach                                Size
    ------------              ---------------------     -----------------         ------------              --------------                                ----
    Test_Space                Parity                    OK                        Healthy                   False                                      19.4 TB
    VMs                       Mirror                    OK                        Healthy                   False                                         3 TB
    Storage space             Mirror                    OK                        Healthy                   False                                       500 GB
    Home Server Pool B        Parity                    OK                        Healthy                   False                                        15 TB
    Home Server Pool B2       Parity                    OK                        Healthy                   False                                        20 TB
    
    
    
    PS C:\WINDOWS\system32> Connect-VirtualDisk -FriendlyName "Test_Space"
    
    PS C:\WINDOWS\system32> Disconnect-VirtualDisk -FriendlyName "Test_Space"
    Disconnect-VirtualDisk : Invalid Parameter
    At line:1 char:1
    + Disconnect-VirtualDisk -FriendlyName "Test_Space"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (StorageWMI:ROOT/Microsoft/...SFT_VirtualDisk) [Disconnect-VirtualDisk], CimException
        + FullyQualifiedErrorId : StorageWMI 5,Disconnect-VirtualDisk
     
    
    PS C:\WINDOWS\system32> Get-VirtualDisk
    
    FriendlyName              ResiliencySettingName     OperationalStatus         HealthStatus              IsManualAttach                                Size
    ------------              ---------------------     -----------------         ------------              --------------                                ----
    Test_Space                Parity                    OK                        Healthy                   False                                      19.4 TB
    VMs                       Mirror                    OK                        Healthy                   False                                         3 TB
    Storage space             Mirror                    OK                        Healthy                   False                                       500 GB
    Home Server Pool B        Parity                    OK                        Healthy                   False                                        15 TB
    Home Server Pool B2       Parity                    OK                        Healthy                   False                                        20 TB
    
    
    
    PS C:\WINDOWS\system32> 


    Tuesday, August 18, 2015 4:21 AM

Answers

  • Solved it myself. Must first do

    Set-VirtualDisk -FriendlyName "Test_Space" -IsManualAttach $true

    and then

    Disconnect-VirtualDisk -FriendlyName "Test_Space"

    That works. The message, 'Invalid Parameter' is inadequate.

    • Marked as answer by Dave Mullard Wednesday, August 19, 2015 2:25 AM
    Wednesday, August 19, 2015 2:25 AM