![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| Guest | HowTo: Reset Local User Password with Powershell. I would like the powershell equivalent of: ------------------------------------------- sComputer = "MyComputer" Set oUser = GetObject("WinNT://" & sComputer & "/Administrator, user") oUser.SetPassword "testpassword" oUser.SetInfo |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: HowTo: Reset Local User Password with Powershell. you can do this with net.exe net.exe user Administrator testpassword Also, I think that this should work: $tUser = [microsoft.visualbasic.interaction]::GetObject("WinNT://./testAccount,user",$null) $im = [reflection.bindingflags]::invokemethod $valtype = $tUser.gettype() $valtype.invokemember("SetPassword",$im,$null,$tUser,"Z@zzyB0y") $valtype.invokemember("SetInfo",$im,$null,$tUser,$null) -- -- James Truher [MSFT] Windows PowerShell Program Management Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "Brandon Shell" <tshell.mask@gmail.com> wrote in message news:%23P0PbvM4GHA.3840@TK2MSFTNGP06.phx.gbl... >I would like the powershell equivalent of: > ------------------------------------------- > sComputer = "MyComputer" > Set oUser = GetObject("WinNT://" & sComputer & "/Administrator, user") > oUser.SetPassword "testpassword" > oUser.SetInfo > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Reset User Account Password | Tutorials | |||
| Brink pls help....wireless not working..no internet signal after user reset password | Network & Sharing | |||
| Changing password for a local user on a remote computer.... | PowerShell | |||
| How do I reset the email address user name and password $ windows | Vista mail | |||
| RE: Reset or Remove a User account password under a second partition/d | Vista account administration | |||