jondwaite / CIVMDisks

PowerShell cmdlets to manage disks attached to Virtual Machines in VMware Cloud Director
MIT License
4 stars 3 forks source link

Using Get-CIVMdisk I get Write-Error: Error retrieving VM properties from VCD API, exiting. #5

Open ezjurgen opened 8 months ago

ezjurgen commented 8 months ago

Hi, I am using vCD version 10.3.3.19610595 and powershell 7.4 core

when running the following code:

$VMName = "Test-SRV01"
Install-Module CIVMDisks -Scope CurrentUser -AllowClobber
Import-Module CIVMDisks
$Vm = Get-CIVM -name $VMName
$Vm
$vm | Get-CIVMDisk | Format-Table

I get this error: Write-Error: Error retrieving VM properties from VCD API, exiting.

The server is found when i output $vm

$vm

Name                           Status                      GuestOSFullName                          CpuCount MemoryGB
----                           ------                      ---------------                          -------- --------
Test-SRV01                  PoweredOff                  Microsoft Windows Server 2022 (64-bit)   1        4,000

anybody an idea?