Home > OS >  Win2008 and 2012 how to account, please set the expiration time?
Win2008 and 2012 how to account, please set the expiration time?

Time:10-02

The domain environment, Windows, to create the local Account ever like Linux Account expires such expiration time Settings?

The Last password change: Aug 07, 2016
Password expires: never
Password inactive: never
The Account expires: Apr 11, 2019
The Minimum number of days between the password change: 0
Maximum number of days between the password change: 99999
Number of days of warning before the password expires: 7

CodePudding user response:

After creating the user will be "password never expires" checked out, and then check the "user can't change password
"Then run the gpedit. The validity of the MSC change passwords

CodePudding user response:

For local accounts, you need to use the powershell set the expiration time,
Set objUser=GetObject (" WinNT://atl - ws - 01/kenmyer ")


ObjUser. AccountExpirationDate=# # 03/01/2008

ObjUser. SetInfo


You can refer to here
https://blogs.technet.microsoft.com/heyscriptingguy/2007/04/05/how-can-i-configure-an-expiration-date-for-a-local-user-account/
  • Related