简体   繁体   English

使用Powershell更改登录密码

[英]Use Powershell to change password on login

At the moment I'm building a login Script on powershell basis. 目前,我正在基于Powershell构建登录脚本。 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. 现在,我发现了一些简洁的东西,例如旧的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. 好的,我将解释我们的设置,我们有一个所谓的VMware View环境,每个用户都可以在其中登录一次。 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). 另外,根据上面的链接,您需要位于域控制器上才能使用net更改密码(或提供“ / domain”选项)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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