Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Password Expiration - Enable or Disable

17 Apr 2015   #20
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by dkotula View Post
It doesn't seem to be listed as an option in win32_userAccount Set, does the command reside somewhere else?
There's not a direct command for that AFAIK. PowerShell, however, has the ability to force a user to change their password at next logon... And if PowerShell can do that, the Command Prompt can too. So I guess there is a command for that.

PowerShell command
Code:
[adsi]'WinNT://./Pyprohly' | %{$_.PasswordExpired = 1; $_.SetInfo()}
Command Prompt command
Code:
powershell "[adsi]'WinNT://./Pyprohly' | %{$_.PasswordExpired = 1; $_.SetInfo()}"
N.B. For the above commands to work, the user account's password must, of course, be set to expire. And your Shell must be elevated.


My System SpecsSystem Spec
.
17 Apr 2015   #21
dkotula

Windows 7 Pro
 
 

That would be a one time option for forcing a password change, but in a password policy situation we would need that to happen every time the password expires. Does this mean that I would have to manually remove the checkmark on each client.

Sorry I should have mentioned we are not in a domain environment as our endpoint computers are spread out all over multiple states and joining them to a domain is a problem because of distance and bandwidth. I would love to have them in AD with the ability to control them better.

I am using Kaseya to push out scripts to the machines, and what I am trying to do is as follows:
User must change password at next logon.
Minimum Password Length
Password Expiry warning 10 days
MaxPasswordAge 90 Days
Alphanum Pwds
Password History

Some of these settings I am changing the registry and some I am using script or power shell, I can't seem to find all the settings in on place in windows 7 Pro, unless I make changes manually.
Am I shooting myself in the foot?
My System SpecsSystem Spec
18 Apr 2015   #22
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

I must admit I'm a little lost with what you are asking. Are you shooting yourself in the foot? I don't know. What problem exactly are you facing?

Quote   Quote: Originally Posted by dkotula View Post
That would be a one time option for forcing a password change, but in a password policy situation we would need that to happen every time the password expires.
When a user's password expires, that user will be forced to change their password upon the next login they make. This behaviour already is already enabled and can't be set differently.

Quote   Quote: Originally Posted by dkotula View Post
Sorry I should have mentioned we are not in a domain environment [...]
Sorry, I should have mentioned that the commands in my post above do not work for a domain environment. Only on local accounts to a machine.

Quote   Quote: Originally Posted by dkotula View Post
I am using Kaseya to push out scripts to the machines, and what I am trying to do is as follows:
User must change password at next logon.
Minimum Password Length
Password Expiry warning 10 days
MaxPasswordAge 90 Days
Alphanum Pwds
Password History
What you are trying to do isn't clear to me. Are you in search of the command equivalent to each of the above?
My System SpecsSystem Spec
28 Apr 2015   #23
dkotula

Windows 7 Pro
 
 

Sorry, I was away taking some classes last week.
I am able to push out some password policy scripts, but it seems I have to do this from multiple locations. Some I am pushing out by changing registry settings, and others I am changing using PowerShell. Is there a way of using a script to perform all the changes from one common location? Above was a small list of the things I'm pushing out, and they work, I'm sure there is a much easier way to accomplish this. I would love to be able to do this from AD but because of the distance between all of the locations, we cannot join our systems to a domain which limits me to workgroup configurations.
My System SpecsSystem Spec
.

01 May 2015   #24
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Sorry for my delay. It's difficult to keep track of members' issues that reside within the threads of tutorials.

As what you're asking no longer relates to the topic of this tutorial, I recommend you describe your issue in a new thread of it's own. Your chance of receiving an answer there, and the rate at which you'll receive replies will triple.
My System SpecsSystem Spec
06 Oct 2015   #25
Bern2b

Windows 7, 64 bits, Home Premium
 
 
Password change enable/disable in Win 7 Home Premium

Hi,

All explanation here are for Windows Professional but do not work with Home Premium.

This is a new embarassing option that I didn't have before.

Please tell me how to stop it?

Thanks,
Bernard
My System SpecsSystem Spec
06 Oct 2015   #26
Brink

64-bit Windows 10 Pro
 
 

Hello Bernard, and welcome to Seven Forums.

You could use OPTION TWO in the tutorial in any edition of Windows.
My System SpecsSystem Spec
06 Oct 2015   #27
Bern2b

Windows 7, 64 bits, Home Premium
 
 

Thank you Brink, I did it and I get :

C:\Users\Bernard>wmic path Win32_UserAccount set PasswordExpires=False
Updating property(s) of '\\BERNARD-PC\root\cimv2:Win32_UserAccount.Domain="Berna
rd-PC",Name="Administrator"'
Property(s) update successful.
Updating property(s) of '\\BERNARD-PC\root\cimv2:Win32_UserAccount.Domain="Berna
rd-PC",Name="Bernard"'
ERROR:
Description = Generic failure

So what is it?

Regards,
Bernard
My System SpecsSystem Spec
06 Oct 2015   #28
Brink

64-bit Windows 10 Pro
 
 

It looks like you didn't run the command in an elevated command prompt.

Elevated Command Prompt
My System SpecsSystem Spec
03 Jul 2016   #29
dorian mode

windows 7 home premium 64 bit
 
 

Thank you Brink for this very helpful tutorial.
My System SpecsSystem Spec
Reply

 Password Expiration - Enable or Disable




Thread Tools




Similar help and support threads
Thread Forum
Password Expiration - Change MAX and MIN Password Age
How to Change Maximum and Minimum Password Age in Windows 7 and Windows 8 This will show you how to change the maximum and minimum password age in days the password for all users can be used before it expires and must be changed by the user in Windows 7 and Windows 8. By default it is 42...
Tutorials
I need to disable password expiration on Windows 7 Home Edition
I bought laptop (Toshiba) in Spring 2012. Computer ran just fine until Oct/Nov 2013 when the FBI impersonator malware got on it. I have never had a password on this laptop. I had to take it to a computer tech. He did something to get it up and running again. After he did whatever he did, I...
System Security
Screen Saver Password Protection -Enable or Disable
How to Enable or Disable Screen Saver Password Protection in Windows 7 and Windows 8 This tutorial will show you how to enable or disable password protection to display the logon screen on resuming from the screen saver in Windows 7 and Windows 8. Through Screen Saver Settings for...
Tutorials
Password Expiration Issue
(Connected via domain) On login I need a way for users to see that there password is about to expire in a more (In your face way!):eek: I.E compared to the default set up that windows 7 provides, which is the balloon popup that disappears after 5 seconds... This is not really useful as it is mostly...
General Discussion
Password History Enforcement - Enable or Disable
How to Enable or Disable Password History Enforcement in Windows 7 and Windows 8 Password history determines the number of unique new passwords that have to be associated with and used by a user before an old password can be reused again. This enables administrators to enhance security by...
Tutorials
build 7100 disable expiration
Is there anything out yet for disabling the expiration on the 7100 build? Starting June 1st it will be turning off every 2 hours.
Performance & Maintenance


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:44.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App