That said you are getting an error rather than a communication failure so perhaps something else is wrong. Most likely thing is that the installer is expecting some kind of input from the user.
I am not exactly sure what is going on but there
are a few things that you can try.
You could try using win_chocolatey to install virtualbox. It is also worth trying using become: runas and having the installation run as the local Administrator user.
I suspect you may still hit the problem with the networking restart. You might be able to get round that by either telling the installer not to restart networking during the installation, or if that isn't possible, by setting up a scheduled task to do the installation.
Hope this helps and you are able to install.
Jon