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