fix hyper-v powershell
This commit is contained in:
parent
de8faa0fa4
commit
bb89649b02
|
@ -151,6 +151,7 @@ sub manage_selection {
|
|||
my $checkpoint = { backing => -1, snapshot => -1 };
|
||||
my $checkpoints = (ref($node->{checkpoints}) eq 'ARRAY') ? $node->{checkpoints} : [ $node->{checkpoints} ];
|
||||
foreach my $chkpt (@$checkpoints) {
|
||||
next if (!defined($chkpt));
|
||||
$chkpt->{creation_time} =~ s/,/\./g;
|
||||
$checkpoint->{ $chkpt->{type} } = $chkpt->{creation_time} if ($chkpt->{creation_time} > 0 && ($checkpoint->{ $chkpt->{type} } == -1 || $checkpoint->{ $chkpt->{type} } > $chkpt->{creation_time}));
|
||||
}
|
||||
|
|
|
@ -53,18 +53,18 @@ Try {
|
|||
$item.name = $vm.VMName
|
||||
$item.state = $vm.State.value__
|
||||
$item.integration_services_state = $vm.IntegrationServicesState
|
||||
$item.integration_services_version = $vm.IntegrationServicesVersion
|
||||
$item.integration_services_version = $vm.IntegrationServicesVersion.toString()
|
||||
$item.note = $note
|
||||
|
||||
$services = New-Object System.Collections.Generic.List[Hashtable];
|
||||
Foreach ($service in $VM.VMIntegrationService) {
|
||||
$service = @{}
|
||||
Foreach ($service in $vm.VMIntegrationService) {
|
||||
$item_service = @{}
|
||||
|
||||
$service.name = $service.Name
|
||||
$service.enabled = $service.Enabled
|
||||
$service.primary_operational_status = $service.PrimaryOperationalStatus.value__
|
||||
$service.secondary_operational_status = $service.SecondaryOperationalStatus.value__
|
||||
$services.Add($service)
|
||||
$item_service.service = $service.Name
|
||||
$item_service.enabled = $service.Enabled
|
||||
$item_service.primary_operational_status = $service.PrimaryOperationalStatus.value__
|
||||
$item_service.secondary_operational_status = $service.SecondaryOperationalStatus.value__
|
||||
$services.Add($item_service)
|
||||
}
|
||||
|
||||
$item.services = $services
|
||||
|
|
Loading…
Reference in New Issue