First, you’ll need to download an app called Unified Remote on your phone (iOSAndroid), and you’ll need to download it’s server in your PC from this website right here.
Go through the installation process on your PC. Once finished, make sure the server app is running on your PC, and then open up the app on your phone. It’ll scan for a server on your local network, and once it finds it, it’ll let you control your PC. 
Now, the way the app works is with a bunch of different remotes.Click that, and then click Shutdown or Restart to turn your PC off.