Open BigAlUK99 opened 5 years ago
Incidentally, using the following when the VM is running does work:
$Text = & $vmrun readVariable "C:\Users\alex\Documents\Virtual Machines\MS-DOS 3.3\MS-DOS 3.3.vmx" runtimeConfig displayname
. So it is not as if the given DisplayName is inherently problematic and thus causing the problem.
In fact my current (very cumbersome) workaround is the horrendous:
foreach ($VM in get-vmx) {($VM | get-vmxconfig | Where-Object {$_.startswith('displayname = ',"CurrentCultureIgnoreCase")}).split('=')[1].trim(' "')}
which may help in identifying a potential correction to the VMXToolkit. :)
Confirmed. Any names with spaces in them simply returns the last 'word'. A name of "Ubuntu 20.04" simply returns "20.04".
VMXToolkit 4.5.3 , Win 10, Powershell 5
When trying to extract the DisplayName for a VM (Get-VMXDisplayName), the trailing characters after any whitespace are all that is returned. For example, if the VM display name is 'MS-DOS 3.3' then just the '3.3' part is returned.
[Using VMXToolkit 4.5.3 on VMware 12.5.9 under Powershell 5.1 on Windows 7 host]