-
Notifications
You must be signed in to change notification settings - Fork 1
Version Information
m1lkman edited this page Mar 15, 2023
·
6 revisions
- Updated Get-PlexToken function to support current Plex OAuth API including Two-Factor Authentication support
- Incorporated support for
-Plex2FA
parameter for interactive execution - Added Exit codes based on results of script (See Exit codes)
- Added
-NotifySuccess
parameter to provide a specific exit code (10) on successful installation of an update - More consistent and improved error handling
- cleaned up parameter sets
- Renamed
-Quiet
parameter to-Silent
- Fixed Token Regex verification (added - and _)
- Fixed logic for searching registry for InstallLocation and PlexOnlineToken that were causing issues on systems that have had both x86 and x64 builds installed previously
- Improved Update Channel detection logic
- Improved some error messages
- Added additional logic to uninstall x64 build first before installing x86 build if present
- Improved exit code matching specifically for x64 installer
- Other various cleanups, fixes, & improvements
- Added support for windows-x86_64 PMS build. Update-PlexMediaServer will continue to update the currently installed Build unless forced by Build parameter (i.g.
-Build 'windows-x86_64'
) - Fix logic to detect active sessions for "in-use" check
- Fix Invoke-WebRequest errors by adding UseBasicParsing parameter (Thanks SAS-1)
- Added logic to retry checking Plex Web after process restart to allow for 30 seconds while web server is launching
- Added Hostname parameter for plex web checks to bypass detecting public hostname using reverse IP lookup (helps for when running multiple PMS instances behind a single public IP)
- Added ReportOnly parameter, script will report if update is required and exit
- Add support for https url scheme when using custom port 443
-PlexServerPort 443
- Other general improvements/fixes
- Added new logic to detect Live TV and DVR sessions to "in-use" check
- Improved logic for stopping PlexService Service
- Added -IncludeLog parameter for including log text in notification email (renamed EmailLog to AttachLog)
- Added -EmailIsBodyHtml parameter to switch email to mobile friendly HTML format
- Improved notification logic and general logging content
- Added support for #Slack notifications with -SlackNotify parameter (Slack OAuth token required)
- Corrected logging error causing large log file
- Corrected some error handling when PMS exe was not detected
- Added -UpdateCleanup parameter and logic to remove old updates from updates folder
- Improved error capture for Send-ToEmail function to return exception with passthru
v2.0.0 2017.10.31 (Updates by m1lkman)
- Significant updates to validate and download the latest version from Plex.tv (Public or PlexPass/Beta)
- Supports authenticating against Plex.tv and local server using Plex.tv credentials or Tokens
- Default execution leverages PMS Server Online Authentication token, honors Update Channel setting.
- Added logic to validate checksum on downloaded updates
- Updated logic to pull PMS user context from Plex Media Server.exe process
- "In-Use Check" will exit when active Sessions are detected on Plex Media Server
- Validates PMS process and Plex Web availability after update
- Added Email notification function
- Added Get-PlexToken function for fetching Plex authentication token via command-line
- Added -force option to force install of PMS even when version isn't newer.
- Corrected Logic for UserName bringing back some original code from eansconforti
- New loop to execute update exe and monitor while running with logic for exitcode
- Switched to $env:SystemDrive to build AppDataPath
- Moved to GitHub m1lkman
- Moved away from using WMI to find User SID
- Added new do loop to find PSM exe in all possible locations
- Switched to $env:LOCALAPPDATA
- increased message verbosity to include version numbers added more comments
- Added check to see if account is disabled.
- Added User check for current user if none specified.
- Cleaned up console output.
- Verify EXE exists before continuing.
- Changed the 'Last 1' to 'First 1' in the EXE sort to return the newest executable.
- Simplified User SID logic so it works for Local accounts and domain accounts.
- Logic to pull non-default local app path if configured then default to AppData
- Re-written from original script by evansconforti on plex forums