Getting Password last set for a user in Active Directory

To see when the user has last changed the password you can use the below command in Php

$user = $_SERVER['AUTH_USER'];
$domain = getenv('USERDOMAIN');
exec("NET USER /DOMAIN ".$UserID." 2>1",$output);
//You can use the below code to see the full details


I am a  Technical Architect who dabbles with different languages and technologies

You may also like...