Add powershell script for retreiving disk info for a hyper-v guest

This commit is contained in:
Brian Cain 2020-04-01 14:09:49 -07:00
parent 50adf04b5d
commit 59bbf9736a
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0

View 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
}