Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ftp = "ftp://192.168.0.2/"
- $user = "user"
- $pass = "pass"
- $webclient = New-Object System.Net.WebClient
- $webclient.Credentials = New-Object System.Net.NetworkCredential($user,$pass)
- $item="C:/Pruebas/origen/prueba.txt"
- $uri = New-Object System.Uri($ftp+$item.Name)
- $webclient.UploadFile($uri, $item.FullName)
- Excepción al llamar a "UploadFile" con los argumentos "2": "Excepción durante una solicitud WebClient."
- En línea: 8 Carácter: 1
- + $webclient.UploadFile($uri, $item.FullName)
- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- + FullyQualifiedErrorId : WebException
Add Comment
Please, Sign In to add comment