Configure the script variables before deploying, for example:
$minimumPasswordLegth = 10 $localAdminName = 'Admin'
Use the same PowerShell script - LeanLAPS.ps1 - for both detection and remediation.
Schedule the script to run as often as required.