Remote Control Powershell windows

Launching and Running Windows Applications Remotely via PsExec and PowerShell

Using PsExec, you can run and open applications via the host's PowerShell over SSH. This article introduces how to launch and run Windows applications remotely via PsExec and PowerShell. Install and set up PsExec on Windows so it can be used...

Shou Arisaka
3 min read
Nov 10, 2025

Using PsExec, you can run and open applications via the host’s PowerShell over SSH. This article introduces how to launch and run Windows applications remotely via PsExec and PowerShell.

For example, my use case is that after processing on an Ubuntu server, I wanted to use Java or AutoHotkey to send tooltip notifications or message boxes to Windows.

Install and set up PsExec on Windows so it can be used.

PsExec - Windows Sysinternals | Microsoft Docs

Download and extract it. You can use it by copying the path to PsExec64.exe.

SSH login to Windows from Ubuntu:

ssh [email protected]

My current environment involves connecting from Ubuntu running in VirtualBox on the host to Windows via SSH to cmd, and then using PsExec within that SSH session to run applications.

It’s a bit complex… or rather, it might be special. So it can work without a username and password. Even PsExec64 from host to host works without a username and password. It’s like SSHing to yourself.

Unfortunately, I can’t use a physical Ubuntu machine right now, so I’d like to verify whether a password is needed from there once it becomes available.

C:\Users\user\Desktop\PSTools\PsExec64.exe \\192.168.3.19 notepad # => notepad doesn't work.
C:\Users\user\Desktop\PSTools\PsExec64.exe \\192.168.3.19 "java.exe -jar C:\pg\SetClipboardWithBtn\build\SetClipboardWithBtn.jar" # => Error.
C:\Users\user\Desktop\PSTools\PsExec64.exe \\192.168.3.19 java.exe -jar C:\pg\SetClipboardWithBtn\build\SetClipboardWithBtn.jar # => Error.
C:\Users\user\Desktop\PSTools\PsExec64.exe \\192.168.3.19 calc # => calc works fine for some reason
C:\Users\user\Desktop\PSTools\PsExec64.exe \\192.168.3.19 -d -i cmd /c notepad # => Doing it this way makes it launch successfully
C:\Users\user\Desktop\PSTools\PsExec64.exe \\192.168.3.19 -d -i cmd /c C:\pg\SetClipboardWithBtn\build\SetClipboardWithBtn.jar # => You can now do anything with Java files, Atom, or anything else in the same way.
C:\Users\user\Desktop\PSTools\PsExec64.exe \\192.168.3.19 -d -i cmd /c start "" C:\pg\SetClipboardWithBtn\build\SetClipboardWithBtn.jar # => Hide the command prompt
C:\Users\user\Desktop\PSTools\PsExec64.exe \\192.168.3.19 -u user -p yourPassword -d -i cmd /c start "" C:\pg\SetClipboardWithBtn\build\SetClipboardWithBtn.jar # => When connecting from an external PC, you (probably) need to set a username and password.

References:

Checking username:

$env:UserName

Or

PS C:\pg> Get-WMIObject -class Win32_ComputerSystem | select username

username
--------
DESKTOP-HOGEHOGE\user

I’m not sure which one to use. Whether it’s just the username, or computer name + username as the username. Since SSH login to cmd itself worked with just the username… I’m not sure.

Checking password:

On Windows, you normally log in with a PIN, so you tend to forget your regular password.

Also, there are several factors that make it complex… Windows passwords can be associated with a Microsoft account or set as a local password - there are two patterns.

Well… I’m not entirely sure what happens if you completely forget this. I was able to remember it by instinct, so that was good…

Share this article

Shou Arisaka Nov 10, 2025

🔗 Copy Links