Export VirtualBox VM with PowerShell and show progress

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Export VirtualBox VM with PowerShell and show progress



I want to export all my VirtualBox VMs for backup purpose using an automated script. The following command should do the export in my PS script:


cmd.exe -c "vboxmanage export Antergos -o D:Temptest.ova"



By running the vboxmanage command in PowerShell, It shows me the progress in 10% steps like this:


vboxmanage


PS C:UsersXYZ> vboxmanage export Antergos -o D:Temptest.ova
0%...10%...



But using the cmd call like above I don't get any output. It would be great to have some progress, since some VMs are quite big (~70GB). I tried different variations:


cmd


iex 'vboxmanage export "$($name)" -o "$targetFile"'
& "vboxmanage export ""$($name)"" -o ""$targetFile"""
Invoke-Command -ScriptBlock cmd.exe /c "vboxmanage export ""$name"" -o ""$fullTargetFile""" 4>&1 4>&1
Invoke-Expression "vboxmanage export ""$name"" -o ""$fullTargetFile"" 2>&1"



None of them show me the progress, which seems wired to me since e.g. Invoke-Expression "vboxmanage --help" print the help, but no progress when using vboxmanage export live above.


Invoke-Expression "vboxmanage --help"


vboxmanage export









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS