Changing Local Security Policies using Powershell

This topic contains 3 replies, has 2 voices, and was last updated by  Dave Wyatt 4 years ago.

  • Author
    Posts
  • #9706

    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

    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

    Steve
    Participant

    Is it possible to do it with a batch file?

  • #9715

    Dave Wyatt
    Moderator

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

You must be logged in to reply to this topic.