-
Notifications
You must be signed in to change notification settings - Fork 15
Server Commands
Server Commands in Apollo are a set of customizable commands defined on the server side, which can be executed from the client-side back menu. They are provided to simplify frequent tasks and actions, offering users a more convenient experience.
Each Server Command has three key components:
- Command Name: The name that appears on the client-side UI, allowing the user to easily identify the action.
- Command Value: The actual command executed on the client's system. If the command contains spaces (like a file path), it must be enclosed in double quotes.
-
Elevated: Specifies whether the command needs to be run with administrator privileges (e.g., for tasks like modifying system settings or running certain applications that require admin rights). This can be set to
true
orfalse
.
Here is a list of sample commands that can be configured in Apollo. You can easily modify or add more commands according to your needs.
Command Name | Command Value | Elevated |
---|---|---|
Calculator | calc.exe |
false |
Sleep Computer | rundll32.exe powrprof.dll,SetSuspendState 0,1,0 |
false |
Shutdown | shutdown /s /f /t 0 |
true |
Restart | shutdown /r /f /t 0 |
true |
Task Manager | "C:\Windows\System32\Taskmgr.exe" |
true |
Open Notepad | notepad.exe |
false |
Open File Explorer | "C:\Windows\explorer.exe" |
false |
Lock Computer | rundll32.exe user32.dll, LockWorkStation |
false |
Unlock Computer | powershell -NoProfile -ExecutionPolicy unrestricted -Command "if (tasklist | findstr -i logonui) { tsdiscon ((quser $env:USERNAME | select -Skip 1) -split '\s+')[2]; sleep 1; tscon ((quser $env:USERNAME | select -Skip 1) -split '\s+')[1] /dest:console }" |
true |
To ensure your computer properly enters sleep mode while still allowing Wake-on-LAN (WOL), run the following command from an Administrator-privileged CMD or PowerShell once:
powercfg /hibernate off
This ensures hibernation is disabled, which is necessary for proper sleep functionality and WOL support.
Running this command will terminate all current connections immediately, but you'll be able to connect back with the computer unlocked shortly. If you're using this command, please make sure you have disabled the "Server Command" permission for untrusted devices, as with this command, it doesn't need your password/pin to unlock your computer!
This script may not work on Home versions of Windows. Source
You can make the unlock process more automatic by using Global Prepare Commands: https://github.com/ClassicOldSong/Apollo/wiki/Auto-lock-unlock-Windows
Apollo also supports the use of AutoHotKey scripts as command values. AutoHotKey can be used to automate repetitive tasks, create keyboard shortcuts, or execute complex actions. Simply reference the AutoHotKey script's executable or use the script file path as the command value in the configuration. Make sure to quote the path if it contains spaces. For example:
Command Name | Command Value | Elevated |
---|---|---|
Start Script | "C:\Scripts\my_automation_script.ahk" |
false |
AutoHotKey provides additional flexibility, allowing for a wide range of customizations and automations. Make sure you have AutoHotKey installed when using AHK scripts.