(Trying to avoid 3rd party programs)
I am trying to call the script in the process but process completes with no success.
These are the two approaches I've tried
Code: Select all
cmd = 'cmd /c "powershell \\SERVER\D$\Data\SendEmail.ps1"';
ExecuteCommand(cmd, 1);
Code: Select all
cmd = 'cmd /c "\\SERVER\D$\Data\SendEmail.cmd"';
ExecuteCommand(cmd, 1);
Code: Select all
powershell "\\SERVER\D$\Data\SendEmail.ps1"
If anyone can shed some light or advise a better approach that would be great. Thanks.