我正在使用PHP(Xampp)处理Active Directory . 我的任务是将用户添加到他们各自的组 . 它配置完全在我的本地系统上运行(Xampp,php7.1,windows 7) . 当我将它迁移到Windows Server 2012时,它显示的错误是我的示例代码:

shell_exec("dsadd user cn={$username},ou={$school},ou=Students,ou=Users,ou=xxx,dc=xx,dc=com -fn \"{$firstName}\" -ln \"{$lastName}\" -email {$email}  -display {$username} -pwd {$password} 2>&1"); shell_exec("dsmod group cn=ISE-PARENTS,ou=\"App_Parents & Students\",ou=Groups,ou=Users,ou=xx,dc=xx,dc=com -addmbr cn={$fatherUsername},ou=Parents,ou=Users,ou=xxx,dc=xx,dc=com 2>&1");

showing error

如果我在CMD上运行它在Windows Server 2012上运行完美 . 请帮我摆脱这个错误 . 我不明白为什么会出现这种错误?