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)