Can any one else reproduce New-VirtualDiskDrive not honouring -RunAsynchronously?
:J
I'm literally doing:
$objHardDisk = Get-VirtualHardDisk | ?{$_.Name -eq "diskinlibrary.vhd"}
$objISO = get-iso | ?{$_.name -eq"isoinlibrary"}
$objVM = get-vm -name myVM
New-VirtualDiskDrive -VM $objVM -VirtualHardDisk $objHardDisk -IDE `
-Bus 0 -LUN 0 -Filename $strFileName -RunAsynchronously
And control is not returned until creation of the disk is complete.
Help:
" -RunAsynchronously
Specifies that the job runs asynchronously so that control returns to the command shell immediately."
(Like you all did not know that and needed me to quote the help to you, sorry.)
:J