how do you shut down a dedicated server via cmd or ps

    Joined
    Apr 5, 2017
    Messages
    11
    Reaction score
    1
    as the name suggests i am trying to figure out how to safely shut down a dedicated server via windows cmd or powershell.
    the reason:
    i am currently running a dedicated server on my server at home. and i am writing a powershell script to backup the server (server database, custom block behavior file, whitelist file, server.cfg file) to a folder named the current date, however now that i am finished i want to set it up as a scheduled task, and in order to backup the server files the server has to be shutdown.
    i run the server via StarMade-dedicated-server-windows.bat so it runs in a cmd window. is there a way the shut down the server through cmd or powershell commands so i can create a script to shut down the server and run it on schedule with the backup script and server script. any ideas?
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    • Legacy Citizen 10
    • Top Forum Contributor
    download this http://files.star-made.org/StarNet.jar

    run it with the command
    Code:
    java -jar starnet.jar 127.0.0.1:4242 [YOUR SUPER ADMIN PASS HERE] /shutdown 0
    you must have the super user enabled on the server config.

    That's the only way I'm aware of, but I don't know anything about sending commands to console windows.
     
    Joined
    Apr 5, 2017
    Messages
    11
    Reaction score
    1
    download this http://files.star-made.org/StarNet.jar

    run it with the command
    Code:
    java -jar starnet.jar 127.0.0.1:4242 [YOUR SUPER ADMIN PASS HERE] /shutdown 0
    you must have the super user enabled on the server config.

    That's the only way I'm aware of, but I don't know anything about sending commands to console windows.
    so i tried this a few times, as-is i got error messages that connection was refused, probably because its listening on one specific ip, so i changed it to that ip rather than loopback and now it just hangs, forever with no feedback. would a white list interfere with it?
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    • Legacy Citizen 10
    • Top Forum Contributor
    so i tried this a few times, as-is i got error messages that connection was refused, probably because its listening on one specific ip, so i changed it to that ip rather than loopback and now it just hangs, forever with no feedback. would a white list interfere with it?
    You did turn on the superadmin, an then set the password in the config right?