public services

Advertisement

apner30
Guest

public services

I would like a PowerShell script to do a file copy from Windows server to Linux server. The following commands do not work. I would like to add that in my case the password is hard-wired. I am asking for support in order to solve the problem.
echo "Mapowanie serwera_new_sitplan" > $logatt
[xml]$v = Get-Content -Path "C:\Other\att_new.xml"
$d = ConvertTo-SecureString -String $v.Configuration.Password
$i = New-Object System.Management.Automation.PSCredential "username", $d
$n = $i.GetNetworkCredential().Password
& "C:\tools\db_backup\winscp.exe" /command "option batch abort" "option confirm off" "open sftp://hyper:$n@192.168.153.101:22" "cd /tmp/test_adz" "put C:\tmp\fred\*.* /tmp/test_adz"
$?
Start-Sleep -Seconds 300

Reply with quote

Advertisement

apner30
Guest

public services

The following commands do not work. that is, there is no copying from C: \ tmp \ fred \ *. * to / tmp / test_adz. Powershel, on the other hand, did not display error message

!Screenshot5.jpg

Reply with quote

martin
Site Admin
martin avatar

Re: public services

You didn't post any new information. Nor does it look like you have followed the link I have posted.

Reply with quote

Advertisement

You can post new topics in this forum