Hey Y’all,
I have the following PS code:
$SBCode = {$WD = “C:\Program Files (x86)\Siber Systems\” +
“AI RoboForm”
$SPArgs = @{FilePath = “$WD\robotaskbaricon.exe”
Verb = “Open”
WorkingDirectory = “$WD”}
Start-Process @SPArgs
} #End $SBCode& $SBCode #Restart RoboForm on Local Computer!
Invoke-Command -ComputerName “$TargetComputer” -ScriptBlock $SBCode
When executing on the Local Computer it works just fine. However, when I attempt to execute it on the remote computer it completes w/o error but does not start Roboform?
If I use the Enter-PSSession to do this interactively it works:
PS> Enter-PSSession -ComputerName Dellxps8700
[Dellxps8700]: PS G:\BEKDocs>
$SBCode = {$WD = “C:\Program Files (x86)\Siber Systems\” +
“AI RoboForm”
$SPArgs = @{FilePath = “$WD\robotaskbaricon.exe”
Verb = “Open”
WorkingDirectory = “$WD”}
Start-Process @SPArgs
} #End $SBCode& $SBCode #Restart RoboForm on Local Computer!
[Dellxps8700]: PS G:\BEKDocs> Exit-PSSession
PS>
Ideas?