![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How do I change domain account password I have service accounts that I use to run SQL Server services. I run powershell from my local machine using my login USERDOMAIN\myid I want to change the password for the service accounts that reside in a different domain PRODDOMAIN\svc_account1. I have permissions to change the service account passwords, and I am able to change the password using the windows server tool "Active Directory Users and Computers" . I cannot get the password change to work using Powershell. I want to avoid having to install the quest cmdlets. I have searched quite a while and this code snippet seems close to what I need. $password='NewPWValue1' $user = [ADSI]"LDAP://CN=svc_account1,OU=Service Accounts,OU=User Data,DC=proddomain,DC=mycompany,DC=com" $user.Invoke("SetPassword", $password) $user.pwdLastSet = 0 $user.SetInfo() I get this errormessage when I run that code: Exception calling "Invoke" with "2" argument(s): "Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERN OTFOUND))" At line:1 char:13 + $user.Invoke( <<<< "SetPassword", "NewPassword123") If I do end up using the ADSI, is there a way to translate t he PRODDOMAIN to the FQDN as in PRODDOMAIN.mycompany.com If you have a better script that works that would be fine. Please help if you can. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Users are unable to change domain password | Vista security | |||
| domain user account UAC without domain admin id/password?? | Vista security | |||
User Account Password - Change from Win RE | Tutorials | |||
| Vista machine cannot change domain password | Vista account administration | |||
| Removed Functionality - Change a password for a domain account from a workgroup machine. | Vista account administration | |||