I would first create a variable with the entire command
$variable = ' command spaces, double_quotes, etc ... ';
- $my_variable = 'C:\WINDOWS\system32\windowspowershell\v1.0\powersh ell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\bin\exshell.psc1" -command ". 'C:\Program Files\Microsoft\Exchange Server\bin\getuserdata.ps1'" ';
Notice I use single quotes to declare the variable, this ignores all double quotes or special characters.
Then I would use the system() function to execute the script. Keep in mind the system function will wait until the process is calling finishes.
hope this helps