Reading the local password policy programmatically

后端 未结 3 586
礼貌的吻别
礼貌的吻别 2021-01-02 16:59

Are there Windows API functions that allows reading what the current password policy is? For instance, minimum length, complexity etc.

If not reading, is there a wa

3条回答
  •  长情又很酷
    2021-01-02 17:39

    Eugene's answer is helpful, but not quite what I needed. The password complexity filter can actually be customized, and what would be good would be a way of asking Windows, does this password meet the requirements?

    It took me a while to locate it, but the function is NetValidatePasswordPolicy. The MSDN docs for this function are awful; check out this MSDN blog entry instead.

提交回复
热议问题