AnsweredAssumed Answered

powershell script fails from PAM run program operator

Question asked by AtulVohra on Apr 29, 2015
Latest reply on Sep 29, 2015 by MWNiebuhr

I have a powershell script that uses New-WebServiceProxy cmdlet to construct the web service proxy and then invoke PAM ExecuteProcess method. This script works fine when called from the cmd window on the server.

I tried calling the same powershell script from PAM's run program operator and it fails when reaches the following statement:

$webservicex=New-WebServiceProxy -Uri $url -namespace WebServiceProxy -Class ExecuteProcess


error seen in PAM is:

New-WebServiceProxy : Could not find a part of the path 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp\mxnvxmzq.tmp'.

At D:\CSC\Scripts\Invoke_ExecuteProcess.ps1:35 char:33

+ $webservicex=New-WebServiceProxy <<<<  -Uri $url -namespace WebServiceProxy -Class ExecuteProcess

    + CategoryInfo          : NotSpecified: (:) [New-WebServiceProxy], DirectoryNotFoundException

    + FullyQualifiedErrorId : System.IO.DirectoryNotFoundException,Microsoft.PowerShell.Commands.NewWebServiceProxy



I added a line to see what if there was a difference in the environement variable when called from PAM in comparision to cmd. But could not find any difference.


I believe there is some setting that needs to be done before PAM executes the script -ANY help would be appreciated.



Atul Vohra