I am working with Windows servers (2008/2012/2016) that are standalone servers not part of a domain.
I would like to change the local security policies via the command line.
I am only interested in changing the items below which includes the new values:
MinimumPasswordAge = 2
MaximumPasswordAge = 45
MinimumPasswordLength = 8
PasswordComplexity = 1
PasswordHistorySize = 3
I thought the best way to go would be with secedit.exe but I cannot seems to get the right command.
There are two ways I see on how to do this:
1.export the local security policy, modify the resulting text file and import with the changes
2. import just the changes
Naturally I would prefer option 2, but I cannot get either option to work.
Can anyone help?
I could use concrete examples.
One command i came across was to input as follows for input:
secedit /configure /db c:\temp.sdb / cfg c:\my-changed-policy-file.inf
I do not understand the above command. How can I select any location for the sdb? The system also says it cannot find "my-changed-policy-file.inf" even though the file exists.
any assistance would be greatly appreciated.
(Please do not quote places on the internet that explain how to do this - I have reviewed a lot of material and find it difficult to work with)
Any advice would be appreciated.