I'm looking forward to run special commands on a target machine in my local network (workgroup, no domain join).
The machines have been previously configured with Enable-PSremoting
etc.. to tolerate Windows remote management so that we can execute a command on the target machine as follows.
The commands work fine except that if I want to start some special commands like start-process, they are not executed as the local machine.
For example, if I run on my local machine:
> Start-Process -Filepath "cmd.exe"
it starts cmd process. If I do it remotely, like this
Invoke-Command -Computername "my-target-ip" -ScriptBlock {Start-Process -Filepath "cmd.exe"} -Credential get-credential
The cmd window is not executed on the target machine.
This would allow me to install some special packages on my target machines which require some autoit GUI configs and which can not be just made via powershell like pausing updates and setting up standard browser apps via the GUI. Otherwise, some normal configs work fine (firewall settings, writing files, enabling network configs etc.)
Thank you very much.