0

I'm trying to make a user's password never expire, so I executed the following command in the domain controller:

net user admin /expires:never

And it succeed.

But months later, the password still gets expired, what should I do in command line?

LeeM
  • 1,388
  • 9
  • 14
daisy
  • 747
  • 4
  • 14
  • 30

2 Answers2

3

You should use AD cmdlets to do this:

    Set-ADUser -Identity username -PasswordNeverExpires $true
Swisstone
  • 6,725
  • 7
  • 22
  • 32
1

Adding the /domain argument should work:

net user admin /expires:never /domain
Wasif
  • 321
  • 2
  • 8