On the remote machine, I copied the .exe file (from my source machine using Copy-Item command) to the temp folder first which was successful. After that, I ran the following Powershell script on my machine, it ran quite fast but no message was displayed and the software was not installed on the remote machine.
$computerName = "LAPTOP"
Invoke-Command -ComputerName $computerName -ScriptBlock { C:\Temp\Cyberduck-Installer-6.9.4.30164.exe /silent}
On the remote machine, winRM services was started. What did I do wrong?
At first create a PoSH session by the example below:
and then Invoke-Command to the specified session as an example below:
and close PSS session