# Stop PMS Windows Command Line

**URL:** <https://forums.plex.tv/t/stop-pms-windows-command-line/830194>\
**Category:** Plex Media Server\
**Tags:** server-windows\
**Created:** [February 9, 2023, 10:48pm UTC](https://forums.plex.tv/t/stop-pms-windows-command-line/830194 "2023-02-09T22:48:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danmarcoux](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@danmarcoux](https://forums.plex.tv/u/danmarcoux)\
**Post date:** [February 9, 2023, 10:48pm UTC](https://forums.plex.tv/t/stop-pms-windows-command-line/830194/1 "2023-02-09T22:48:56Z")

</div>

Is there a safe/sane way to stop the Plex Media Server from the Windows Command Line? I’d rather just not kill the PID, but I can do that.

---

<div class="post-metadata">

**Author:** ![beckfield](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/beckfield/32/7227_2.png) [@beckfield](https://forums.plex.tv/u/beckfield)\
**Post date:** [February 9, 2023, 11:01pm UTC](https://forums.plex.tv/t/stop-pms-windows-command-line/830194/2 "2023-02-09T23:01:36Z")

</div>

I found this:

> [@Shut down Plex from the command line?](https://forums.plex.tv/t/shut-down-plex-from-the-command-line/551172/8):
>
> Running taskkill /im "Plex Media Server.exe" (without the /f) flag initiates a graceful shutdown of PMS. Without the /f flag, the process is signaled to close (it appears from my logs that a WM\_CLOSE message is sent). Plex then shuts down various functions (network advertisement, plug-ins, tuner service, database connections) and exits. Including the /f (force) flag forces a shutdown, whether or not it can be performed gracefully. However, without the flag, the application can choose to cont…

---

<div class="post-metadata">

**Author:** ![danmarcoux](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@danmarcoux](https://forums.plex.tv/u/danmarcoux)\
**Post date:** [February 9, 2023, 11:04pm UTC](https://forums.plex.tv/t/stop-pms-windows-command-line/830194/3 "2023-02-09T23:04:44Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [May 10, 2023, 11:05pm UTC](https://forums.plex.tv/t/stop-pms-windows-command-line/830194/4 "2023-05-10T23:05:23Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
