• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support General Questions Windows's Command Line

     
    • 0 Vote(s) - 0 Average

    Windows's Command Line

    qwerty12
    Offline

    Junior Member

    Posts: 30
    Threads: 0
    Joined: 2023 Jun
    Reputation: 3
    #2
    2023-07-25, 02:28 PM
    Hi,

    One way to do it is this:
    1. Go to http://127.0.0.1:8096/web/index.html#!/apikeys.html and add an API key
    2. Run
      Code:
      curl "http://127.0.0.1:8096/System/Shutdown" -X POST -H "X-Emby-Token: 123456789abcde"


    Replace the host and port if necessary. Replace 123456789abcde with the API key you generated earlier. I think you can authenticate via a username and password instead of generating an API key, but I don't know how, and I think using an API key for this task is better. curl.exe is included with Windows since Windows 10. If it is not present, you can use PowerShell to achieve the same thing:
    Code:
    Invoke-WebRequest -UseBasicParsing -Uri "http://127.0.0.1:8096/System/Shutdown" -Method POST -Headers @{ "X-Emby-Token" = "123456789abcde" }

    Otherwise:

    If, contrary to the Windows installer's recommendation, you installed Jellyfin in service mode, a simple net stop JellyfinServer in an elevated Command Prompt* on the same system where Jellyfin is running should also work.

    If you're using the tray app, a PowerShell script that uses GenerateConsoleCtrlEvent should also work, but that's a long story.

    * Or change the ACL on the Jellyfin service to allow stopping as a normal user - look into sc sdset or System Informer for a GUI


    There might be more ways to do it that I'm unaware of. Avoid taskkill though - Jellyfin doesn't listen for window messages so it will cause unclean Jellyfin shutdowns.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    Messages In This Thread
    Windows's Command Line - by Nast - 2023-07-25, 12:16 PM
    RE: Windows's Command Line - by qwerty12 - 2023-07-25, 02:28 PM
    RE: Windows's Command Line - by wanderman - 2024-05-15, 06:38 PM
    RE: Windows's Command Line - by skribe - 2023-07-25, 02:32 PM
    RE: Windows's Command Line - by TheDreadPirate - 2024-05-15, 07:07 PM
    RE: Windows's Command Line - by wanderman - 2024-05-16, 07:24 PM
    RE: Windows's Command Line - by qwerty12 - 2024-05-17, 09:45 PM

    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode