I am trying to do a Powershell script in a Windows Server 2019. The script must check some values of the gpo eg:"Enforce password history is set to 24 or more"
if the checking is OK leave it like that and if not, change it to the value that must be.
I have tried many ways but i cannot do it. Any idea???