Topic "Using Powershell to change sftp site passwords"

Author Message
JustAsking
[View user's profile]

Joined: 2017-01-09
Posts: 13
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.
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
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"?

Quote:
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.
Guest




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)...
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License