To open the Calculator app on a remote Windows server (server02) from your local server (server01), you can use PowerShell’s Invoke-Command cmdlet and the Start-Process command:
Table of Contents
Method 1: Using PowerShell
PowerShell (Run as Administrator):
Invoke-Command -ComputerName server02 -ScriptBlock {Start-Process calc.exe}
This command executes Start-Process calc.exe on server02, launching the Calculator app on the remote desktop session.
Prerequisites:
- PowerShell remoting enabled on both servers
- Administrator access to run PowerShell
- Appropriate firewall rules to allow remote connections
Method 2: Using psexec
Alternatively, use psexec from the Sysinternals suite:
Command Prompt (Run as Administrator):
psexec \\server02 calc.exe
Psexec executes calc.exe on server02, displaying the Calculator in the remote session.
Method 3: Using WMI
Windows Management Instrumentation (WMI):
wmic /node:"server02" process call create "calc.exe"
Method 4: Using Task Scheduler
Task Scheduler method:
Copyschtasks /create /tn "RemoteCalc" /tr calc.exe /sc once /st 00:00 /s server02 schtasks /run /tn "RemoteCalc" /s server02
Method 5: Using Remote Desktop Gateway
For seamless access, consider setting up a Remote Desktop Gateway.
These commands assume you have appropriate permissions on server02. For security, use these methods cautiously and only on trusted networks. Remember to replace “server02” with the actual remote server name or IP address.
By leveraging these command-line tools, you can effortlessly open the Calculator app on a remote Windows server, enhancing productivity and streamlining remote management tasks.