Don't you need a shebang line at the start of the PowerShell script?
For example: #!/usr/bin/env pwsh
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have two VM's (VM-1&VM-2) installed with window server 2022. on both the systems I have installed GIT.
case#1 : when power shell is the default shell : Run the bellow command on both VM's
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
SCP is working fine from VM-1 to VM-2 ,and I am able to copy files .
Case#2: when Gitbash is the default shell: Run the bellow command on both VM's
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\Git\bin\bash.exe" -PropertyType String -Force
scp is not working from VM-1 to VM-2 and showing lost connection message
kindly help me with this query ASAP.
Thanks
Don't you need a shebang line at the start of the PowerShell script?
For example: #!/usr/bin/env pwsh