Use the same PowerShell script - LAPS.ps1 - for both detection and remediation.
Schedule the script to run as often as required.