The following code will launch notepad.exe which can be seen in the processes. But it does not launch the notepad on the screen.
$wmi = [WMIClass]"\\REMOTE_MACHINE_NAME\root\cimv2:Win32_Process" $result = $wmi.Create("notepad.exe", $null, $null) The following code also launches the notepad on the remote machine for a specified duration but it is not visible.
Invoke-Command -ComputerName "REMOTE_MACHINE" -Credential $cred -ScriptBlock { Start-Process "C:\Windows\System32\Notepad.exe" Start-Sleep -Seconds 15 Get-Process -Name "Notepad" #-ErrorAction SilentlyContinue Get-Process | Where-Object {$_.Name -Like 'Note*'} } How to achieve this? I do not want to use PSEXEC for security reasons.