Error trying to use private key
I'm getting a error trying to use a ppk file.
Thx.
What am I doing wrong?Error: The value supplied is not valid, or the property is read-only. Change the value, and then try again.
Thx.
# Load WinSCP .NET assembly Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll" # Read XML configuration file [xml]$config = Get-Content "c:\demo\pros-config-testing.xml" # Setup session options $sessionOptions = New-Object WinSCP.SessionOptions -Property @{ Protocol = [WinSCP.Protocol]::Sftp HostName = $config.Configuration.HostName UserName = $config.Configuration.UserName PortNumber = $config.Configuration.PortNumber SshHostKeyFingerprint = $config.Configuration.SshHostKeyFingerprint