I know this post is older and honestly I haven't downloaded the .zip and looked at it yet, but I have a question.
How do you verify that Windows is not already activated? My team has been trying to figure out a way to search for non-activated machines at our clients but the only thing we could think of was searching for a specific event ID. However the problem with that is if that event has triggered just once in the past, even if it's currently activated, it shows that PC in the search.
How do we do a more accurate search for non-activated Windows devices?