UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Cadet 1st Class
Cadet 1st Class
157 views

Using Powershell 7 in OO

Jump to solution

Hi, 

i am trying to use parameters in powershell, which are released in Version 7. While debugging my flow in OO the Powershell Script doesn't know this parameters. It seems, that it is using Powershell 5. 

I Have installed Powershell 7 and the scrip works fine in Visual Studio Code. 

Do you have any suggestions how to use powershell 7 in OO?

 

Thanks in Advise, 

Fabian

0 Likes
1 Solution

Accepted Solutions
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hello Fabian710,

Have you tried providing a PowerSHell 7 configuration to the "configurationName" input?

"configurationName - The name of the PSSessionConfiguration to use. This can be used to target specific versions of PowerShell if the PSSessionConfiguration is properly configured on the target. By default, after PSRemoting is enabled on the target, the configuration name for PowerShell v5 or lower is 'microsoft.powershell', for PowerShell v6 is 'PowerShell.6', for PowerShell v7 is 'PowerShell.7'. Additional configurations can be created by the user on the target machines.
Valid values: any PSConfiguration that exists on the host.
Examples: 'microsoft.powershell', 'PowerShell.6', 'PowerShell.7'"

View solution in original post

3 Replies
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hello Fabian710,

Have you tried providing a PowerSHell 7 configuration to the "configurationName" input?

"configurationName - The name of the PSSessionConfiguration to use. This can be used to target specific versions of PowerShell if the PSSessionConfiguration is properly configured on the target. By default, after PSRemoting is enabled on the target, the configuration name for PowerShell v5 or lower is 'microsoft.powershell', for PowerShell v6 is 'PowerShell.6', for PowerShell v7 is 'PowerShell.7'. Additional configurations can be created by the user on the target machines.
Valid values: any PSConfiguration that exists on the host.
Examples: 'microsoft.powershell', 'PowerShell.6', 'PowerShell.7'"

View solution in original post

Cadet 1st Class
Cadet 1st Class

@Madalin Enea this is not working at the moment. I have set the configurationName to 'PowerShell.7' but now i get some errors: 

{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;}

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.