Is that a good one or a bad one? What is the incorrect state we are trying to resolve and what is the corrected state?
There does seem to be a breadcrumb left behind by the script that could be detected:
$value = Get-ItemProperty -Path HKLM:\Software\Microsoft\PushButtonReset -Name WinREPathScriptSucceed
This should be the correct relevance to determine if the script has run successfully or not:
not exists (it as string as integer) whose(it = 1) of values "WinREPathScriptSucceed" of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PushButtonReset" of (x64 registries; x32 registries)
That said, I see in the script where it looks to see if that value is set and if not then it doesn’t run.