且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

创建具有“密码永不过期"的用户在 PowerShell 中

更新时间:2023-11-04 16:53:52

您可以创建帐户并使用以下内容

You could create the account and use the following

Set-ADUser -Identity <name> -PasswordNeverExpires $true

这会将帐户的密码设置为永不过期,如果您使用循环创建帐户,则可以将其添加到其中.

this will set the account's password to never expire, if you're using a loop to create the account you can add that into it.