简体   繁体   中英

Use Powershell to change password on login

At the moment I'm building a login Script on powershell basis. This login script should be able to change the users Password on login and change it back to the original on logout.

Problem here being that I want to change a Password of a domain user, the same user as the one who is logged in obviously

Now I found some neat stuff like the old, net.exe. but it all says I don't have the rights to change the password in the Domain.

I really can't believe that this is something impossible cause the user himself can change the password too.

Otherwise I'd have to find out how to run a login script with a domain admin...

Edit:

ok I'll try to explain our setup we have a so called VMware View environment, in which every user can login once. now we have the problem that there are accounts with generally known passwords, and some people find it highly amusing to steal others sessions. I've thought about it and making a little script that changes and then resets the password would be a neat little solution. I hope I was of help^^

It would be really helpfull if I could get some thoughts on this Thanks in advance

This link might help you.

Also, according to the link above, you need to be on the domain controller to use net to change password (or supply the "/domain" option).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM