-1
I need to change the password of an AD user using php and powershell would be like: connect to AD with ldap, write powershell codeline in php and run it, make it run in AD too, wrote a line to show a user’s parameters but it doesn’t work!
if (ldap_bind($ldap_con, $ldap_dn, $ldap_pass))
{
echo Shell_Exec('Get-ADUser -Identity Usuario -Properties mail');
}
I checked the apache error.log and this appears:
The term 'Get-Aduser' is not recognized as cmdlet, fun‡Æo, script file or program name Oper vel. Check the spelling of the name or, if a path has been included, see if the path is correct and try again.
trial
echo Shell_Exec('powershell Get-ADUser -Identity Usuario -Properties mail');
– Augusto Vasques
Nothing appears
– Marcos Vinicius