For now, I would recommend against this.
But you can use shutdown as a client if remote shutdown is enabled on the target machine and is in the same workgroup.
Example:
shutdown.exe /s /m \\<target-computer-name> /t 00
replacing <target-computer-name> with the URI for the target machine,
Otherwise, if you want to run this through Apache, you need to configure the script package as a CGI script by placing AddHandler cgi-script .bat and Options +ExecCGI in the local .htaccess file or in the main configuration for installing Apache.
Then you can simply call the .bat file containing the shutdown.exe from your browser.
source share