Author Posts

April 7, 2017 at 12:35 pm

Hi everybody

I want to know if somebody can help me to write a script which will force an administrator to change a local administrator password without known the older password.

Thank's 🙂 .

April 7, 2017 at 2:00 pm

something like this

$user = [adsi]"WinNT://$ComputerName/$username"
$user.SetPassword($Password)
# may be it is needed too, can't remember. Or it need only for various user parameters
# $user.SetInfo()

April 10, 2017 at 11:23 am

Thank's. But when I try this, it's ask me the older password. Is it possible to change the password without knowing the older?

Thank's and excuse me for my poor english 🙂

April 10, 2017 at 4:34 pm

If maintaining local admin passwords is your goal I recommend LAPS. Easy to setup and it works great in my experience.

https://www.microsoft.com/en-us/download/details.aspx?id=46899

April 11, 2017 at 7:07 am

Thank's for your reply.

But my goal is to use powershell to force a user to change the local administrator password without knowing the older.
In fact, our VM machines when they are build are not directly in a domain. We use IaaS in fact. so the blueprint just have an account (local administrator), and i want with a powershell script to force user to change the password without knowing the older. I want to be the only to keep this old password.

PS: Excuse me again for my poor english.

Thanks everybody

April 11, 2017 at 2:15 pm

May be you non-admin on comoputer where you try to change password ? It never ask me