Last Modified Date5/3/2022 3:21 PM
Repair-PME is a script provided to the community that repairs N-able Patch Management Engine (PME) used by N-able N-Central. If for any reason it becomes corrupt, fails an upgrade or installation process PME-Repair should be able to fix it in the most scenarios.
Repair-PME was created as I was getting frustrated with having to spend time trying resolve various issues where PME had broken and subsequently caused Patch Status v2 to become misconfigured in N-Central. Obviously having this in the misconfigured state is very bad as you cannot determine what's going on with patching. Please note is only designed to fix issues where PME is broken and reinstall is required to resolve. There may be cases where you will need to engage support to assist further. An example of an error that can be fixed with this tool.
Repair-PME does the following with logic, error handling and event logging to operate as user-friendly as possible. Any errors during execution of the script will throw to PowerShell and will also be reported to the event log (Event ID 100).
As of release 0.1.9.0 there are two user changeable settings which can be found at the beginning of the script in the settings section.
$RepairAfterUpdateDays - Change this variable to number of days (must be a number!) to begin repair after new version of PME is released. Default is 2. Repair-PME will abort if an update is pending within this period.
$ForceRepairRecentInstallDays - Change this variable to number of days (must be a number!) within a recent install to allow a force repair. This will bypass the update pending check. Default is 2. Ensure this is equal to $RepairAfterUpdateDays.
Windows 8/8.1;Windows 10;Windows Server 2012 / 2012R2;Windows Server 2016;Windows Server 2019
Compatible with N-central
N-central minimum version
Compatible with RMM
Yes, just add the code to a 'Run Powershell Script' object in Automation Manager, save the AMP as 'Repair-PME' and upload to your N-Central server. It is the recommended method of using this script via N-Central.
Yes, if you wish to do so. Please be aware your execution policy is set to allow this to run though.
Yes, but if this is executed during the wait period (2 days by default) of when an update has been released but has yet to be installed the script will abort with an error as it is recommended this is done gracefully via the built-in update mechanism. The only exception to this is if an install has occured in the last 2 days. This is to account for situations where an auto-update does not complete succesfully. It is recommended this is used as self-healing in conjunction with Prejay Shah's 'Patch Status - PME' AMP.
Patch, Patch management, PME, Fix, Repair