cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
323
Views
0
Helpful
0
Replies
KAKA_2
Beginner

UCSD Execute PowerShell Command Task

Dear Experts,

I am trying to automate an Exchange Task using UCSD and in workflow i am trying to run a powershell script and have following questions/issue.

1) execution of this script when running natively is more than a Minute where as in the UCSD workflow "Execute PowerShell Command Task" i see one can configure Maximum wait time to 60 seconds.

does it mean script which has execution time more than a Minute cannot be executed? or it is possible to configure somewhere in UCSD?

2) First two lines of script is:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://EX001.domain.local/PowerShell/

Import-PSSession $Session

When i run the script it failes and in the log i see below entries.

2019-05-22 16:58:36,141 [7] ERROR cuic.MaskedRemoteScriptHandler [(null)] - ERROR processing URL Exception while executing script: Cannot validate argument on parameter 'Session'. The argument is null. Provide a valid value for the argument, and then try running the command again.

What does it mean?

As above two lines were set to cover a spcial case, i thouth to remove it and check if script can be executed at all but then i get below error.

2019-05-22 17:22:07,299 [7] ERROR cuic.MaskedRemoteScriptHandler [(null)] - ERROR processing URL Exception while executing script: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

There is no line number and on local machine script can be executed without any issue, how do i troubleshoot?

Thank you in advance for your help.

 

-KAKA-

0 REPLIES 0
Content for Community-Ad
This widget could not be displayed.