How to expire an AD account 30 days from 1st login


how can expire or disable ad account 30 days 1st login?

jason

i planning on  running every 4 hours , change days 29 said.

jason

if testing lastlogon on yesterday, there no need run script more once per day. second time runs re-process of last logged on yesterday.

but note this. if logs on again before expiry, prevent script extending expiry? if want based on first logon, script need check user's logon count (from dc's). then, if logs on twice in 1 day...


al dunbar -- remember 'mark or propose answer' or 'vote helpful' appropriate.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

server manager error: ADAM.events.xml could not be enumerated.

Cannot access Anywhere Access using domain name?

WMI Failure: Unable to update Local Resource Group