Accessing more properties of Local Security Policy with powershell

Nuro007 1 Reputation point
2022-11-18T04:08:28.91+00:00

I want to modify any property that is in secpol.msc \> Security settings \> Account Policies. Microsoft unfortunately only gives support for a few of them, so there are still properties that I can't access.

For the Account Policies for example, only the following are aviable to change via net accounts

   NET ACCOUNTS    
   [/FORCELOGOFF:{minutes | NO}]    
   [/MINPWLEN:length]    
   [/MAXPWAGE:{days | UNLIMITED}]    
   [/MINPWAGE:days]    
   [/UNIQUEPW:number] [/DOMAIN]  

Is there any way to access and modify other properties?

I have looked into other questions that have been previously asked and answered, but most of them are outdated or associated with code that is literally unreadable and very hard to maintain.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 34,116 Reputation points Microsoft Vendor
    2022-11-22T05:53:56.217+00:00

    Hi @Nuro007 ,

    You have to use SECEDIT to configure the Local Security Policy. Please refer to below link for more details

    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/secedit

    Best Regards,
    Ian Xue

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments