Hi All,
our OO studio version: 2019.11 b43
Goal:
Run a PS1 Script with loaded PSM module via RAS.
Problem:
new Flow --> Powershell Script Element --> Input script --> Use Constant
Here I add my script and normally it works.
But if there are too much rows the limit of the Constant Value Box is reached??
More than 222 lines I can't add into the box.
Next Try:
installed PSM on RAS and testet my script locally on the RAS --> works, the system knows the cmdlets
then added in the Constant field just the few rows for the connect.
$servername = "servername.fqdn" $username = "domain\serviceuser" $password = "password" $dsmPort = "8080" $dsmProtocol = "http" $credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, (ConvertTo-SecureString $password -AsPlainText -Force) $global:swv_webservice = $proxy = New-WebServiceProxy -Uri ${dsmProtocol}://$($servername):${dsmPort}/blsAdministration/AdministrationService.asmx -Credential $credentials $Result = Connect-DSM7Web -WebServer $servername -Port 8080 -UseDefaultCredential if($Result){ return 0 }else{ return 1 }
from Client to DSM Server via PS1 --> works
from RAS to DSM Server via PS1 --> works
from OO Studio via debug local Connection --> error
{exception=dotNETWebActions_PowerShell.PowerShellExceptions.SessionException: Could not connect to host. ---> System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server localhost failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. --- End of inner exception stack trace --- at PowerShellV2.PSRunspaceV2.NewRemoteSession(String host, PSCredential credential, AuthenticationMechanism authentication) at PowerShellV2.PSRunspaceV2.CreateRunspace(String host, PSCredential credential, AuthenticationMechanism authentication) at PowerShellV2.PSRunspaceV2.CreateNewRunspace() at PowerShellV2.PSRunspaceV2..ctor(PSAuthenticationInfo authInfo) at PowerShellV2.PowerShellFactoryV2.CreateRemoteRunspace(PSAuthenticationInfo psAuth, Boolean keepSessionAlive, Boolean enablePiping) at PowerShellCommon.PowerShellFactory.CreateRunspace(PSAuthenticationInfo authInfo, Boolean keepSessionAlive, Boolean enablePiping) at dotNETWebActions_PowerShell.IActions.PowerShellBaseAction.GetPSRunspace(ActionRequest req) at dotNETWebActions_PowerShell.IActions.PowerShellBaseAction.ExecutePowerShell(ActionRequest req, ISession s, IActionRegistry reg);returnCode=1;returnResult=Could not connect to host.;sessionId=new session;isSessionOn=False;Result=1;}
Where is my failure?
Where does the Access Deny comes from? RAS or DSM Server?
kind regards
Tob