When you use SSH to execute commands on a remote Windows machine, the commands run in a non-interactive session. This means that graphical applications like Notepad cannot display their windows on the remote machine's screen when invoked this way. The SSH session does not have access to the graphical user interface (GUI) of the Windows machine.
If you want to run a GUI application like Notepad on a remote Windows machine, you would typically need to use a remote desktop solution, such as Remote Desktop Protocol (RDP), which allows you to interact with the Windows desktop environment directly.
Alternatively, if you need to perform tasks that do not require a GUI, you can use command-line tools or scripts that run in the background without needing to display a window.
For command-line interactions, you can use PowerShell remoting or other command-line utilities that are designed for remote management without the need for a GUI.
References: