ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Powershell script to change local admin account password

    IT Discussion
    windows group policy admin active directory powershell
    2
    2
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • IRJI
      IRJ
      last edited by

      You can no longer change local admin accounts with GPP. I am looking for a way to do it in powershell. Has anyone done this before?

      http://blogs.technet.com/b/srd/archive/2014/05/13/ms14-025-an-update-for-group-policy-preferences.aspx

      1 Reply Last reply Reply Quote 2
      • GregoryHallG
        GregoryHall
        last edited by

        $computers = Get-Content -path C:\fso\computers.txt
        $user = "aUser"
        $password = "MyNewPassword!"
        Foreach($computer in $computers)
        {
        $user = [adsi]"WinNT://$computer/$user,user"
        $user.SetPassword($Password)
        $user.SetInfo()
        }

        http://blogs.technet.com/b/heyscriptingguy/archive/2009/03/25/how-can-i-change-the-passwords-of-multiple-local-computer-accounts.aspx

        1 Reply Last reply Reply Quote 2
        • 1 / 1
        • First post
          Last post