Shut down Plex from the command line?

Take a look: PSA: Script to back up and restore Plex app data on a Windows system