دنبال کننده ها

۱۳۹۶ دی ۱۱, دوشنبه

powershell - Get-ADObject is not working in php

[ad_1]



I am trying to query GC through PHP. I am just running simple test query. But it is not running with get-adobject. but if i use get-aduser i can get the result. it is weird. Even very simple get-adobject query is not working. For example below.



$user="xyzabc";
$queryfilter=""samaccountname=$user"";
$cmd='powershell "Get-ADObject -LDAPFilter ('.$queryfilter.') –Server abc1.xyz.com:3268"';


Then i am running exec($cmd) which is not giving any results/error. it is weird that even if i hardcode the variable still is not working or giving any error. I have run many other powershell queries using exec without any issues. But this get-adobject gives me hard time. can someone please help me.




[ad_2]

لینک منبع