locked
Account options RRS feed

  • Question

  • Hi,

    I'd like to know which users of my domain haven't the account option "password never expires" enabled.

    If it isn't possible to know which are the last users created would be a good option because I could check whether the last users have this option enabled or not.

    Can anybody help me?

    Thanks in advance.

    Regards.

    Thursday, December 20, 2012 8:41 AM

Answers

  • Does it work for server 2k8 sp2 or only for windows server 2k8 R2?

    It works in Powershell on both 2008 and 2008 R2.
    Monday, December 24, 2012 8:54 AM

All replies

  • Get-ADUser -Filter 'PasswordNeverExpires -eq $false' -Server localDC | select name

    this command will show all user which haven't the account option "password never expires".

    Thursday, December 20, 2012 11:43 AM
  • Thanks AmitCEH for your information.

    I've a windows server 2008 sp2 which is domain server.  I've executed your command on this server and I've got the following error:

    'Get-ADUser' is not recognized as an internal or external command,
    operable program or batch file.

    I've have installed the role 'Active Directory Domain Services' in this server.

    I also looked for the get-aduser command in all the server but I didn't find it.

    Any suggestion, please?

    Regards.

    Thursday, December 20, 2012 2:10 PM
  • This command is run within powershell.

    IT Knowledge Base | itgeared.com |

    Thursday, December 20, 2012 2:32 PM
  • Does it work for server 2k8 sp2 or only for windows server 2k8 R2?
    Thursday, December 20, 2012 3:15 PM
  • Does it work for server 2k8 sp2 or only for windows server 2k8 R2?

    It works in Powershell on both 2008 and 2008 R2.
    Monday, December 24, 2012 8:54 AM