Product, version and build: PS Studio 2022 Trial Version
Operating system: Win 11
PowerShell version(s): 7
32-bit version of software? 64
In PS Studio 2022, the ssh cmd prompt appears whenever a remote ps script using ssh is executed, how can that be suppressed? This is not a good behavior because the cmd prompt gets in the way of the messagebox or inputbox. In PS Studio 2019 i was not seeing this behavior which was ideal.
PS Studio 2022 and ssh behavior not ideal
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Re: PS Studio 2022 and ssh behavior not ideal
Does this also happen when you run your script with Windows PowerShell (v5) instead of PowerShell 7?
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: PS Studio 2022 and ssh behavior not ideal
I have to use PS7 for advanced ssh support since V5 doesn't do it.
Re: PS Studio 2022 and ssh behavior not ideal
We are looking into this and will get back to you soon.
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: PS Studio 2022 and ssh behavior not ideal
Thank you for looking into this.
This works well in PS Studio 2019. the ssh window won't appear. Example code.
$session = New-PSSession -HostName $remotecomputer
$output = Invoke-Command -Session $session -ScriptBlock { Get-Hotfix }
This works well in PS Studio 2019. the ssh window won't appear. Example code.
$session = New-PSSession -HostName $remotecomputer
$output = Invoke-Command -Session $session -ScriptBlock { Get-Hotfix }
Re: PS Studio 2022 and ssh behavior not ideal
Are your scripts connecting to your remote machine when it opens a cmd prompt?
Are you also prompted when you run from the console (Ctrl + F8)?
Are you also prompted when you run from the console (Ctrl + F8)?
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: PS Studio 2022 and ssh behavior not ideal
The scripts are connecting to a remote machine with the cmd prompt opens. CTL-F8 simply will not run the script.
Re: PS Studio 2022 and ssh behavior not ideal
Does a cmd prompt open when you run outside of PowerShell Studio in a PowerShell Console?
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: PS Studio 2022 and ssh behavior not ideal
When the Credentials parameter was added, I did not get the cmd console prompting:
- $session = New-PSSession -ComputerName $remotecomputer -Credential $credentials
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: PS Studio 2022 and ssh behavior not ideal
$session = New-PSSession -ComputerName $remotecomputer -Credential $credentials would work because it is using WinRM. However, $session = New-PSSession -HostName $remotecomputer is used for SSH. -HostName instead of -ComputerName and -Credential is not required since the Public key is loaded on the remote system.