

At the moment only the free version of Plex is supported. If Plex is running as a desktop application, it kills the process, installs the newer version and relaunches the application. If Plex is running as a service, it stops the service, installs the newer version and restarts the service. In case that a new version is available it downloads it and installs it. The script retrieves the current version of Plex from the RSS feed of Plex and then it checks if the installed version is up to dates or not. To start and stop the service use either the service management console or the following instructions in a command shell: Nssm.exe set PlexService ObjectName "Local Service" To change the service account from local system to local service execute the following instruction: Nssm.exe install PlexService "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe" "-noninteractive" To run Plex media server as service with NSSM execute in a command shell the following instruction: The objective of this script is to have an automatic update mechanism for Plex media server also when it runs as service. The only disadvantage of a service is that it is a little bit more complicated to update, because before installing the new version, the service has to be stopped, this means that the update mechanism of Plex media server doesn't work. It can run under a less privileged account, like the local service.It restarts automatically, in the case that it crashes.It starts automatically when Windows starts, this means that Windows can install updates automatically and reboot, and is not a problem.It doesn't require a logged in user, thus less CPU and RAM, thus less electricity consume and fan noisy.Running Plex media server as a service has different advantages: AlwaysUp: Not free and clearly close source, native binary, generic solution for any application.SrvAny: Free and close source, native binary, generic solution for any application, produced from Microsoft but not as good as NSSM.NSSM: Free and close source, native binary, generic solution for any application.PMService: Free and open source, requires.

Plex is a great media server but on Windows it can't run as a service natively, to run it as a service requires a service wrapper like: This script has been inspired from the PMS as a service updater script. Powershell script to update Plex media server when configured to run as a service
