Managing a Minecraft Server With Windows PowerShell.
So, my friends and I run our own little MC Server and we decided to automate Boot up and shutdown. Thus I was tasked with writing a .ps1 file to do just that. I Present to You MCServerMgr.ps1! This file manages the MC server based on the time of day. Basically, if the server stops 9am-12pm, It'll Reboot the server. If the server stops from 12pm-8:59am, It shuts down the host PC. The times were simply chosen because we decided 9:00am was a good time to start the server, and midnight was a good time to stop it. Here Is the Code I Wrote: (I recommend copy and pasting this into PowerShell ISE, VS Code, or Notepad++)