Quantcast
Channel: Hyper-V forum
Viewing all articles
Browse latest Browse all 8743

Get-VHD : Failed to get the disk information.

$
0
0

Import-Module FailoverClusters
Import-Module Hyper-V
$nodes = Get-ClusterNode
Foreach($node in $nodes)
{
    $VMs=Get-VM -ComputerName $node.name
    foreach($VM in $VMs )
    {
        $vm.VMName
       Get-VHD -ComputerName $node.Name -VMId $VM.VMId | ft Path, Size , FileSize

}
}

Above script gives the below error message, did anybody have any advise?

Hypervtest1
Get-VHD : Failed to get the disk information.
'':  account does not have permission required to open attachment
'\\stor1host.xxxx.com\sata09\XXXXXXXX-1\Windows2012R2-sysprep-g1_E2270657-209E-452D-813F-D0C309AE1F66.avhdx'. Error: 'General access denied error' (0x80070005).
(Virtual machine ID )
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:10 char:9
+         Get-VHD -ComputerName $node.Name -VMId $VM.VMId | ft Path, @{N="PROVISIO ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (Microsoft.Hyper...l.VMStorageTask:VMStorageTask) [Get-VHD], VirtualizationOperationFailedException
    + FullyQualifiedErrorId : AccessDenied,Microsoft.Vhd.PowerShell.GetVhdCommand


Viewing all articles
Browse latest Browse all 8743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>