tomohulk / WinSCP

WinSCP PowerShell Wrapper Module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New-WinSCPSessionOption: SshHostKeyPolicy missing as parameter?

TheUntouchable opened this issue · comments

Issue Description

I am currently switching from plain winscp .NET Assembly to your powershell module to make it easier for my colleagues to handle the script.

I just wanted to migrate my current session settings, where I have set the SshHostKeyPolicy to AcceptNew, but I can't see that there is a parameter in the new-winscpsessionoption for that. I have set it manually afterword with $variable.SshHostKeyPolicy = "AcceptNew", but it would be of course cleaner if I could do that directly in the creation of the object.

Perhaps I just missed something?

I am on the latest version of your modules and using powershell 7.2.8 on Win10 21H2

Thats probably a new Property on the object. I'll get that added with the next release. Thanks for letting me know!

Welcome! Looking forward to the new release :)

Ok, I added the parameter, can you grab the ./WinSCP folder from this repo, import it and test it, see if it works?

Let me know and I'll push it to the PowerShellGallery. Thanks.

@tomohulk Sorry, been a bit stressful at work, will test it on Monday and get back to you :)

Just wondering if you got a chance to test this out?

@tomohulk Hey! I am very sorry but I am currently ill and therefore not at work, will come back as soon as I can!

Closing, no reply.