The concern I have is that I can't store the user's password anywhere. As soon as the user enters the password, I want to validate if it's compliant with the password policy settings on that machine.
I came across net commands to retrieve related information but net doesn't work for standard users.
A standard user can't create another user account on that machine- so from that account, I can't try to create another user with same password to check the password compliance.
Also tried changing the standard user's password with the same password itself with the intention that if it's not compliant, I will get a password non-compliant error. But it can mess up the password history.
Is there any way I can just simply check if password is compliant for a standard user via powershell without performing any write actions?
Perhaps this utility function can help you out there: