IT Process Automation

  • 1.  powershell script fails from PAM run program operator

    Posted Apr 29, 2015 06:03 PM

    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.

     

    Thanks

    Atul Vohra



  • 2.  Re: powershell script fails from PAM run program operator

    Posted Jun 03, 2015 03:43 PM

    Can anyone help Atul please?

     

    Thanks

     

    powershell script fails from PAM run program operator

     

    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.

     

    Thanks

    Atul Vohra



  • 3.  Re: powershell script fails from PAM run program operator
    Best Answer

    Broadcom Employee
    Posted Sep 29, 2015 03:50 PM

    There are specific requirements that need to be set for powershell to function.

    Please see the following for details:

    PowerShell Execution Policy - CA Process Automation - 4.3 - CA Technologies Documentation

     

    If you look in the Predefined Content folder, under Utilities there is a process that sets the above configuration for you.