Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

Re: Using Powershell to change sftp site passwords

martin wrote:

You have to supply the password each time I want to connect with WINSCP.

Maybe, if you show us your script,. it will have it easier for us to understand, what you want.


My bad...

I got ahead of myself. I do exactly what I asked in another of my Powershell scripts:

$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = $fptProtocoliSeries
HostName = $ftpAddressiSeries
UserName = $ftpUseriSeries
Password = $ftpPassiSeries
SshHostKeyFingerprint = $ftpKeyiSeries
}

Never mind (long and hard day)...
martin

Re: Using Powershell to change sftp site passwords

Sorry, I do not understand any of your questions.

JustAsking wrote:

Is there a way I can also update the WINSCP password via Powershell?

What do you mean by "WINSCP password"?

OR... Is there a way to supply the WINSCP password each time I want to connect with WINSCP?

You have to supply the password each time I want to connect with WINSCP.

Maybe, if you show us your script,. it will have it easier for us to understand, what you want.
JustAsking

Using Powershell to change sftp site passwords

I use WINSCP to exchange files with an AS400 system. I use it via Powershell and have the file transfer integrated into a larger script that does a number of things, all automated.

The password rules on the AS400 for the SFTP account are now changing to require that the password on the AS400 change every 30 days.

I have already updated my Powershell script to generate a new password and assign it to the account on the AS400. Is there a way I can also update the WINSCP password via Powershell?

OR... Is there a way to supply the WINSCP password each time I want to connect with WINSCP? Again, I use WinSCPnet.dll via Powershell and would rather not switch over to doing "scripting".

Thanks.