Guest User

Untitled

a guest
Oct 20th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. $ftp = "ftp://192.168.0.2/"
  2. $user = "user"
  3. $pass = "pass"
  4. $webclient = New-Object System.Net.WebClient
  5. $webclient.Credentials = New-Object System.Net.NetworkCredential($user,$pass)
  6. $item="C:/Pruebas/origen/prueba.txt"
  7. $uri = New-Object System.Uri($ftp+$item.Name)
  8. $webclient.UploadFile($uri, $item.FullName)
  9.  
  10. Excepción al llamar a "UploadFile" con los argumentos "2": "Excepción durante una solicitud WebClient."
  11. En línea: 8 Carácter: 1
  12. + $webclient.UploadFile($uri, $item.FullName)
  13. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  14. + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
  15. + FullyQualifiedErrorId : WebException
Add Comment
Please, Sign In to add comment