Changing Local Security Policies using Powershell

Welcome Forums General PowerShell Q&A Changing Local Security Policies using Powershell

This topic contains 3 replies, has 2 voices, and was last updated by

 
Member
5 years, 5 months ago.

  • Author
    Posts
  • #9706

    Participant
    Points: 0
    Rank: Member

    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

    Member
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    Is it possible to do it with a batch file?

  • #9715

    Member
    Points: 0
    Rank: Member

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

The topic ‘Changing Local Security Policies using Powershell’ is closed to new replies.