mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
19 lines
433 B
PowerShell
19 lines
433 B
PowerShell
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
#Requires -Modules VagrantMessages
|
|
|
|
param(
|
|
[Parameter(Mandatory=$true)]
|
|
[string]$VmId
|
|
)
|
|
|
|
try {
|
|
$Controller = Hyper-V\Get-VM -ID $VmId | Hyper-V\Get-VMScsiController
|
|
} catch {
|
|
Write-ErrorMessage "Failed to retrieve scsi controller info for ${VmId}: ${PSItem}"
|
|
exit 1
|
|
}
|
|
|
|
$result = ConvertTo-json $Controller -Depth 20
|
|
Write-OutputMessage $result
|