Puppet on Windows shows the following errors when running with debugging:
This debugging was added in https://github.com/puppetlabs/puppet/commit/bea9ff75d5946dbb92c90ef068cf6c2d4cb0db85. However, the name_to_principal method is sometimes called with valid account names like Administrator, so the call to string_to_sid_ptr fails with (ERROR_INVALID_SID 0x539 and the debug message is printed.
I think it'd be better to check if name starts with something like S-\d+-\d+ or only log the error if e.code != 0x539. For example, if the SID string refers to an account that doesn't exist, you'll get 0x534 ERROR_NONE_MAPPED.