Aus mir unbekannten Gründen funktioniert das Starten von Remoteinstallationsprozessen mit dem PowerShell CMDlet invoke-command nicht. Man kann einen Prozess aber auch per WMI starten. Hier die entsprechende Funktion dafür.
Function New-RemoteProcess { Param([string]$computername=$env:computername, [string]$cmd=$(Throw "You must enter the full path to the command which will create the process.") ) $ErrorActionPreference="SilentlyContinue" Trap { Write-Warning "There was an error connecting to the remote computer or creating the process" Continue } Write-Host "Connecting to $computername" -ForegroundColor CYAN Write-Host "Process to create is $cmd" -ForegroundColor CYAN [wmiclass]$wmi="\\$computername\root\cimv2:win32_process" #bail out if the object didn't get created if (!$wmi) {return} $remote=$wmi.Create($cmd) if ($remote.returnvalue -eq 0) { Write-Host "Successfully launched $cmd on $computername with a process id of" $remote.processid -ForegroundColor GREEN } else { Write-Host "Failed to launch $cmd on $computername. ReturnValue is" $remote.ReturnValue -ForegroundColor RED } }