The problem is in the single quotes, you can only use single quote (') to open and close the variable.
This variable should work:
$ps_exec = 'C:\WINDOWS\syst em32\windowspow ershell\v1.0\po wers hell.exe -PSConsoleFile "C:\Program Files\Microsoft \Exchange Server\bin\exsh ell.psc1" -command ". \" C:\Program Files\Microsoft \Exchange Server\bin\getu serdata.ps1\" " ';
User Profile
Collapse
-
I would first create a variable with the entire command
$variable = ' command spaces, double_quotes, etc ... ';
Notice I use single quotes to declare the...Code:$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'" ';
Leave a comment:
-
pipe output to a perl script
Hello,
I currently have an application in perl that starts a text based torrent client, once I give the necessary parameters to the torrent.exe it will start printing out the following information and of course downloading the files.
I have no problem starting the process and piping its output to a log file to read it (currently what I do). However the file is getting very big to loop around it. I do...
No activity results to display
Show More
Leave a comment: