Exception calling “DeleteUpdate” with “1” argument(s): “spDeleteRevision: cannot delete revisionid: 502004 because it is still deployed to a Non DSS Target Group
you need to set the update to NOT APPROVED by at the parent ALL COMPUTERS level and select APPLY TO CHILDREN. Even though all of the children were already set to N/A NOT APPROVED that setting was not inherited from the parent and that is apparently required if you want to remove the update via PowerShell.
If you still have issues, in the WSUS console find all of the computers that have the upgrade installed and remove them from WSUS. Then run the SERVER CLEAN UP WIZARD and run the script again. The PC’s you just removed will rejoin WSUS the next time they try to sync up (likely 3am).