I am trying to make a php script to change Active Directory User passwords by executing powershell. http://pastebin.com/XYvSFjPv - for those that wish to look
Ran into a problem escaping quotes "
and '
My goal is to make full use of all characters (utf08 standard) including quotes
as I've been through many websites of how to escape and still not come to a satisfactory result.
I would like some help in escaping these characters if at all possible because I have found no function to easily escape characters.
I am running this script on a Windows 2008 server with IIS 7, PHP 5.4 and Powershell v1.0
and by observation the command shell_exec()
sends to command-line which in turn starts up powershell (I am not sure if i have to double escape to make this work.)
And to make sure it's clear I would like to escape the following characters '
and "
for Powershell v1.0 using the shell_exec()
command.