Hi!
I've seen a few posts about this issue, but none works for me..
I have a SCVMM 2016 with 3 differents Clusters in it (cluster1, cluster2, cluster3), i would like to achieve the following:
- List all the vhdx and vhd with full path of a specific cluster like cluster1
- List all the vm's vhdx and vhd across the different clusters with full path too.
The "best" result i could achieve was from a post: https://social.technet.microsoft.com/Forums/en-US/8696598e-dbf6-4a47-9873-a490ecf0f737/get-storage-drives-info-for-all-vms-in-a-given-cluster?forum=winserverhyperv
Some results were ok, but others gave me "permission denied" (cannot understand why, the permissions are the same in the different vhd/vhdx files)
Result OK:
Name : myserver01
Free(GB) : 34
Path : \\nas.domain.com\vms\myvm01\myvm01.vhdx
Type : Dynamic
Used(GB) : 26
Total(GB) : 60
Result Failed:
Get-VHD : Getting the mounted storage instance for the path '\\nas\vms\myvm02\Virtual Hard Disks\myvm.vhdx' failed.
You do not have permission to perform the operation. Contact your administrator if you believe you should have permission to perform this operation.
At line:14 char:15
+ ... $VHDs=Get-VHD $vm.harddrives.path -ComputerName $vm.computernam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Get-VHD], VirtualizationException
+ FullyQualifiedErrorId : AccessDenied,Microsoft.Vhd.PowerShell.Cmdlets.GetVHD
Any ideas? Thanks!