Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

How to set a password for a workgroup Server 2008r2 user account

$
0
0

Subject about spells it out. I have searched and tried both WMIObject win32_UserAccount and also ADSI but it looks like neither allow the password to be set.

I have 14 non-domain joined servers that I and a couple others manage and I want to put together a simple script for them to reset their password on all servers. I have the remote part working just don't have method to do the password setting.

One search I did showed ([adsi]"WinNT://servername/user").SetPassword("newpassword") but SetPassword is not a method. The popup suggestions show a Password method but when I try it the error says there isn't one.

Thanks for any help you can provide.

Jeff


Viewing all articles
Browse latest Browse all 10624

Trending Articles