20130806 windows 7 account expiration - plembo/onemoretech GitHub Wiki

title: Windows 7 account expiration link: https://onemoretech.wordpress.com/2013/08/06/windows-7-account-expiration/ author: phil2nc description: post_id: 6205 created: 2013/08/06 10:47:20 created_gmt: 2013/08/06 14:47:20 comment_status: closed post_name: windows-7-account-expiration status: publish post_type: post

Windows 7 account expiration

For some reason all the local administrator accounts on one of our home Windows 7 systems are set to expire. Solution below. This is really annoying, but easily fixed. Open a command prompt using "Run as administrator" and issue this command:

wmic useraccount where Name='myuser' \
set PasswordExpires=false

To find out whether an account is set to expire you can use this syntax:

wmic useraccount where Name='myuser' \
get PasswordExpires

The reply will either be "true" or "false". Other WMI (Windows Management Instrumentation) query types can be found here. The WMI Reference is a comprehensive source of information on WMI and the tools to use with it.

Copyright 2004-2019 Phil Lembo