# Convert to WIM: # tasks: # scripts: # # Download .vmdk # - ${bamboo.build.working.directory}\bamboo-specs\scripts\Copy-DatastoreItem.ps1 -VMName ${bamboo.vmname}-physical -VSpherePassword "${bamboo.vspherepassword}" # # Remove unsupported key from descriptor file # - Set-Content -Path "${bamboo.vmname}-physical.vmdk" -Value (Get-Content -Path "${bamboo.vmname}-physical.vmdk" | Select-String -Pattern 'ddb\.toolsInstallType.*' -NotMatch) # # Convert to .vhd # - Import-Module ${bamboo.build.working.directory}\bamboo-specs\scripts\MVMC\MvmcCmdlet.psd1 # - ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "${bamboo.vmname}-physical.vmdk" -DestinationLiteralPath "${bamboo.vmname}-physical.vhd" -VhdType DynamicHardDisk -VhdFormat Vhd # - Remove-Item *.vmdk # # Convert to .wim # - $MountPath = New-Item -Path "$PWD\Mount" -ItemType 'Directory' -Force # - Mount-WindowsImage -ImagePath "${bamboo.vmname}-physical.vhd" -Path $MountPath.FullName -Index 1 # - ${bamboo.build.working.directory}\bamboo-specs\scripts\New-WindowsImageJob.ps1 -ImageName 'Server2019' -SourceFolder $MountPath.FullName -DestinationFile "$PWD\diskimage.wim"