Set account expiration date for a user account using powershell

Hi, 

I'm using the following command to set account expiration date but it is not working. 

Set-QADUser -Identity username -AccountExpires date

The AccountExpires value changes, but not AccountExpirationStatus value doesn't changes. Also, on the ARS console the Account expires stays the same and doesn't change. 

What is the correct command to use so that the correct date reflects on ARS console? 

Parents
  • The AccountExpires value changes, but not AccountExpirationStatus value doesn't changes. Also, on the ARS console the Account expires stays the same and doesn't change. 

    This seems like a timing issue. How did you check this?  Is it possible that your call to AD to check the status hit a different DC that had not yet received the new accountexpires value?

    Also, on the ARS console the Account expires stays the same and doesn't change. 

    Did you "Refresh" the object in the MMC to force AR to re-read AD?

Reply
  • The AccountExpires value changes, but not AccountExpirationStatus value doesn't changes. Also, on the ARS console the Account expires stays the same and doesn't change. 

    This seems like a timing issue. How did you check this?  Is it possible that your call to AD to check the status hit a different DC that had not yet received the new accountexpires value?

    Also, on the ARS console the Account expires stays the same and doesn't change. 

    Did you "Refresh" the object in the MMC to force AR to re-read AD?

Children
No Data