Add powershell script for retreiving disk info for a hyper-v guest
This commit is contained in:
parent
50adf04b5d
commit
59bbf9736a
14
plugins/providers/hyperv/scripts/list_hdds.ps1
Normal file
14
plugins/providers/hyperv/scripts/list_hdds.ps1
Normal file
@ -0,0 +1,14 @@
|
||||
#Requires -Modules VagrantMessages
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$VmId
|
||||
)
|
||||
|
||||
try {
|
||||
$VM = Hyper-V\Get-VM -Id $VmId
|
||||
Hyper-V\Get-VMHardDiskDrive -VMName $VM
|
||||
} catch {
|
||||
Write-ErrorMessage "Failed to retrieve all disk info from ${VM}: ${PSItem}"
|
||||
exit 1
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user