From ec1aa6ab85d0e63c6869f7f8e73e1f3df55802da Mon Sep 17 00:00:00 2001 From: djpbessems Date: Tue, 11 May 2021 09:00:32 +0200 Subject: [PATCH] Fix XML method invocation --- scripts/Update-OvfConfiguration.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Update-OvfConfiguration.ps1 b/scripts/Update-OvfConfiguration.ps1 index 68f1ae3..a15f107 100644 --- a/scripts/Update-OvfConfiguration.ps1 +++ b/scripts/Update-OvfConfiguration.ps1 @@ -116,13 +116,13 @@ ForEach ($DynamicDisk in $OVFConfig.Disks.Dynamic) { } } $XMLDiskAttrUnits.Value = "byte * 2^$($Powers)" - $XMLDiskAttrFormat.CreateAttribute('format', $XML.DocumentElement.ovf) + $XMLDiskAttrFormat = $XML.CreateAttribute('format', $XML.DocumentElement.ovf) $XMLDiskAttrFormat.Value = 'http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized' - $XMLDiskId.CreateAttribute('diskId', $XML.DocumentElement.ovf) + $XMLDiskId = $XML.CreateAttribute('diskId', $XML.DocumentElement.ovf) $XMLDiskId.Value = "vmdisk$($DiskId)" - $XMLDiskAttrCapacity.CreateAttribute('capacity', $XML.DocumentElement.ovf) + $XMLDiskAttrCapacity = $XML.CreateAttribute('capacity', $XML.DocumentElement.ovf) $XMLDiskAttrCapacity.Value = '${{vmconfig.disksize.{0}}}' -f $DiskId - $XMLDiskAttrPopulated.CreateAttribute('populatedSize', $XML.DocumentElement.ovf) + $XMLDiskAttrPopulated = $XML.CreateAttribute('populatedSize', $XML.DocumentElement.ovf) $XMLDiskAttrPopulated.Value = 0 [void]$XMLDisk.Attributes.Append($XMLDiskAttrUnits)