Password Expiration - Enable or Disable

Page 3 of 3 FirstFirst 123

  1. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #20

    dkotula said:
    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.
    Last edited by Pyprohly; 17 Apr 2015 at 06:53.
      My Computer


  2. Posts : 7
    Windows 7 Pro
       #21

    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 Computer


  3. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #22

    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?

    dkotula said:
    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.

    dkotula said:
    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.

    dkotula said:
    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 Computer


  4. Posts : 7
    Windows 7 Pro
       #23

    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 Computer


  5. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #24

    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 Computer


  6. Posts : 2
    Windows 7, 64 bits, Home Premium
       #25

    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 Computer


  7. Posts : 72,083
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #26

    Hello Bernard, and welcome to Seven Forums. :)

    You could use OPTION TWO in the tutorial in any edition of Windows.
      My Computer


  8. Posts : 2
    Windows 7, 64 bits, Home Premium
       #27

    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 Computer


  9. Posts : 72,083
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #28

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

    Elevated Command Prompt
      My Computer


  10. Posts : 27
    windows 7 home premium 64 bit
       #29

    Thank you Brink for this very helpful tutorial.
      My Computer


 
Page 3 of 3 FirstFirst 123

  Related Discussions
Our Sites
Site Links
About 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 18:56.
Find Us