Changing Local Security Policies using Powershell

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Dave Wyatt Dave Wyatt 3 years, 8 months ago.

  • Author
    Posts
  • #9706
    Profile photo of Steve
    Steve
    Participant

    I was wondering if was possible to write a script to change local security policies such as account policy and audit policy.Some guidance would be appreciated.

    Thanks,

    Steve

  • #9707
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    I don't know, off the top of my head, if there are cmdlets to do this (and if there are, they probably only exist in Windows 8 / Server 2012). You can always use the old command-line utilities from a PowerShell script, though (net accounts, and auditpol.exe).

  • #9714
    Profile photo of Steve
    Steve
    Participant

    Is it possible to do it with a batch file?

  • #9715
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Yep. Same commands I mentioned before: "net accounts" and "auditpol.exe".

You must be logged in to reply to this topic.