- 1 year ago
How to perform [System.Windows.Forms.SendKeys]::SendWait("Clear{Enter}") on remote systems from local
To perform [System.Windows.Forms.SendKeys]::SendWait("Clear{Enter}")
on remote systems from the local system, you can use PowerShell remoting.
First, you need to enable PowerShell remoting on the remote system by running the following command on the remote system:
Enable-PSRemoting -Force
Next, you need to connect to the remote system using PowerShell remoting from the local system. You can do this by running the following command:
mathematicaEnter-PSSession -ComputerName <remote_computer_name>
Once you are connected to the remote system, you can execute the [System.Windows.Forms.SendKeys]::SendWait("Clear{Enter}")
command as usual.
When you are done, you can exit the PowerShell remoting session by running the following command:
mathematicaExit-PSSession
Note that you need to have appropriate permissions to enable PowerShell remoting and connect to remote systems using PowerShell remoting.