Thank you for your response. I tried the suggested in the documentation arguments before posting my question but it didn't work, perhaps I am not doing it the right way:
$target_vm->UpgradeTools_Task('/S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs"');
throws the following exception:
Error: Failed to handle message: Undefined subroutine &Unexpected arguments: /S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs" at (eval 82) line 143
VimService::build_arg_string('ARRAY(0xae34d08)', 'HASH(0xae34c88)') called at (eval 82) line 3033
VimService::UpgradeTools_Task('VimService=HASH(0xb187868)', '_this', 'ManagedObjectReference=HASH(0xa8cb7f8)', '/S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs"', undef) called at .../VICommon.pm line 1699
ViewBase::invoke('VirtualMachine=HASH(0xb4106c8)', 'UpgradeTools_Task', '/S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs"', undef) called at ...
VirtualMachineOperations::UpgradeTools_Task('VirtualMachine=HASH(0xb4106c8)', '/S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs"') called at ...
Anything obvious I miss?