Assistance with changing local security policy

Welcome Forums General PowerShell Q&A Assistance with changing local security policy

Viewing 5 reply threads
  • Author
    Posts
    • #272410
      Participant
      Topics: 1
      Replies: 2
      Points: 16
      Rank: Member

      What is the best method for changing the local security policy on a PC via powershell

      I need to update the membership for local policies>user rights assignment>access this computer from the network via powershell but I am having issues determining the best way to accomplish this.

      I am fairly new to powershell so please forgive me if I am not familiar with more advance commands and scripting.

       

      Thanks

    • #272437
      Participant
      Topics: 5
      Replies: 170
      Points: 656
      Helping Hand
      Rank: Major Contributor

      I don’t think there is a native PowerShell way to do this.  You can however use secedit in PowerShell.  Someone may have written a secedit wrapper for PowerShell.  You might want to check the PowerShell gallery.

    • #272455
      Participant
      Topics: 1
      Replies: 2
      Points: 16
      Rank: Member

      I don’t think there is a native PowerShell way to do this. You can however use secedit in PowerShell. Someone may have written a secedit wrapper for PowerShell. You might want to check the PowerShell gallery.

      That’s what I had been seeing but wanted to make sure. I am not really following how to make the one simple change with secedit.

      I found the ntrights.exe app from Server 2003 resource kit that will make the change fairly simply but not really sure about using the deprecated tool in my production environment.

      • This reply was modified 1 week, 6 days ago by kordra06.
    • #272473
      Participant
      Topics: 9
      Replies: 676
      Points: 2,674
      Helping Hand
      Rank: Community Hero
    • #272503
      Participant
      Topics: 2
      Replies: 6
      Points: 32
      Rank: Member

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

      Secedit is probably one of the best ways to do this, otherwise you are stacking piles of extra “stuff” onto your project. Adding a mansion on top of your sailboat.

      Useful example taken from StackOve.. and this below example shows turning off password complexity. Will have to mess around to find what you wanna do

      If you run into issues, consider adding sleep commands somewhere in there to allow time for export etc

      • This reply was modified 1 week, 6 days ago by Ciphers42.
    • #273118
      Participant
      Topics: 1
      Replies: 2
      Points: 16
      Rank: Member

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

      Secedit is probably one of the best ways to do this, otherwise you are stacking piles of extra “stuff” onto your project. Adding a mansion on top of your sailboat.

      Useful example taken from StackOve.. and this below example shows turning off password complexity. Will have to mess around to find what you wanna do

      If you run into issues, consider adding sleep commands somewhere in there to allow time for export etc

      I see what I need to add to the new PCs from cfg file that is created from secedit /export /cfg c:\new.cfg from an existing one but not sure how to only export/import the one settings.

      SeNetworkLogonRight = *S-1-1-0

      Can the cfg file just be trimmed down to only make that one change or do all the perimeters need to be set for it to work?

      The PCs we are editing are vendor PCs that are used by our office so I am attempting to just target the exact changes we need to make without potentially changing anything else unnecessarily.

       

       

      • This reply was modified 1 week, 3 days ago by kordra06.
Viewing 5 reply threads
  • You must be logged in to reply to this topic.