Search notes:

VBoxManage guestcontrol

Subcommands

closeprocess [common-options] < --session-id <ID> | --session-name <name or pattern> <PID1> [PID1 […]]
closesession [common-options] < --all | --session-id <ID> | --session-name <name or pattern> >
copyfrom, copyto
list <all|sessions|processes|files> [common-opts]
mkdir, rmdir
mktemp
mv, move, ren[ame]
rm, removefile
run
start
closesession [common-options] < --all | --session-id <ID> | --session-name <name or pattern> >
watch [common-options]

Run a PowerShell command in the guest

The following example runs a powershell command in the guest and prints the output to the local console:
PS C:\> $psCmd='get-service VBoxService'
PS C:\> VBoxManage guestcontrol Windows11 run --username tq84 --password theSecret  --exe "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -- $psCmd

Start calc.exe in the guest

PS C:\> vboxmanage guestcontrol Windows11 run --exe calc.exe --username tq84 --password theSecret

See also

VBoxManage modifyvm
VBoxManage

Index