Advertisement
Guest User

Untitled

a guest
Oct 1st, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.09 KB | None | 0 0
  1. # Create an FTPWebRequest object to handle the connection to the FTP server
  2. $sourceuri = "ftp://192.168.1.4/ROOT/CobianBackups"
  3. $ftprequest = [System.Net.FtpWebRequest]::Create($sourceuri)
  4.  
  5. # Set the request's network credentials for an authenticated connection
  6. $username = "admin" #Change username when done
  7. $password = "xxx"
  8. $ftprequest.Credentials = New-Object System.Net.NetworkCredential($username,$password)
  9.  
  10. [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { return $true } #ignore unsigned SSL cert, UNSECURE! Get signed SSL
  11. # Set FTPWebRequest method to ListDirectory
  12. $ftprequest.Method = [System.Net.WebRequestMethods+Ftp]::ListDirectoryDetails
  13. $ftprequest.EnableSsl = $True
  14. $ftprequest.UseBinary = $False
  15. $ftprequest.UsePassive = $True
  16. $ftprequest.KeepAlive = $False
  17.  
  18. $ftpresponse = $ftprequest.GetResponse()
  19.  
  20. #Write-Host $ftpresponse.StatusCode
  21. #Write-Host $ftpresponse.StatusDescription
  22.  
  23.  
  24. $reader = New-Object IO.StreamReader $ftpresponse.GetResponseStream()
  25. $reader.ReadToEnd()
  26. $reader.Close()
  27.  
  28. echo $reader
  29.  
  30. -rw-rw-rw- 1 admin users 137233604 Sep 30 13:41 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-30 13;36;52 (Full).zip
  31. -rw-rw-rw- 1 admin users 138556255 Sep 30 19:48 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-30 19;36;18 (Full).zip
  32. -rw-rw-rw- 1 admin users 139217601 Oct 1 00:12 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-10-01 00;00;03 (Full).zip
  33. -rwxrwxrwx 1 admin users 698303741 Sep 3 00:05 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-03 00;00;03 (Full).zip
  34. -rwxrwxrwx 1 admin users 699470009 Sep 4 00:06 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-04 00;00;03 (Full).zip
  35. -rwxrwxrwx 1 admin users 700639919 Sep 5 00:06 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-05 00;00;03 (Full).zip
  36. -rwxrwxrwx 1 admin users 698361150 Sep 6 00:06 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-06 00;00;03 (Full).zip
  37. -rwxrwxrwx 1 admin users 699553508 Sep 7 00:06 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-07 00;00;03 (Full).zip
  38. -rwxrwxrwx 1 admin users 700758345 Sep 8 00:06 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-08 00;00;03 (Full).zip
  39. -rwxrwxrwx 1 admin users 698512347 Sep 9 00:06 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-09 00;00;03 (Full).zip
  40. -rwxrwxrwx 1 admin users 699752013 Sep 10 00:06 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-10 00;00;03 (Full).zip
  41. -rwxrwxrwx 1 admin users 701003563 Sep 11 00:06 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-11 00;00;03 (Full).zip
  42. -rwxrwxrwx 1 admin users 698883380 Sep 12 00:06 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-12 00;00;03 (Full).zip
  43. -rwxrwxrwx 1 admin users 700251730 Sep 13 00:06 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-13 00;00;03 (Full).zip
  44. -rwxrwxrwx 1 admin users 701612056 Sep 14 00:08 HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-14 00;00;04 (Full).zip
  45. -rwxrwxrwx 1 admin users 79 Sep 14 00:15 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-14 00;14;59 (Full).zip
  46. -rwxrwxrwx 1 admin users 137231884 Sep 14 07:38 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-14 07;35;22 (Full).zip
  47. -rwxrwxrwx 1 admin users 138496696 Sep 14 14:59 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-14 14;55;24 (Full).zip
  48. -rwxrwxrwx 1 admin users 136790964 Sep 15 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-15 00;00;03 (Full).zip
  49. -rwxrwxrwx 1 admin users 138052042 Sep 16 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-16 00;00;04 (Full).zip
  50. -rwxrwxrwx 1 admin users 139355293 Sep 17 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-17 00;00;03 (Full).zip
  51. -rwxrwxrwx 1 admin users 137115162 Sep 18 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-18 00;00;03 (Full).zip
  52. -rwxrwxrwx 1 admin users 138536791 Sep 19 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-19 00;00;03 (Full).zip
  53. -rwxrwxrwx 1 admin users 139959405 Sep 20 00:04 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-20 00;00;03 (Full).zip
  54. -rwxrwxrwx 1 admin users 137663847 Sep 21 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-21 00;00;03 (Full).zip
  55. -rwxrwxrwx 1 admin users 138945285 Sep 22 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-22 00;00;03 (Full).zip
  56. -rwxrwxrwx 1 admin users 140230350 Sep 23 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-23 00;00;03 (Full).zip
  57. -rwxrwxrwx 1 admin users 137699171 Sep 24 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-24 00;00;03 (Full).zip
  58. -rwxrwxrwx 1 admin users 138988930 Sep 25 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-25 00;00;03 (Full).zip
  59. -rwxrwxrwx 1 admin users 140287732 Sep 26 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-26 00;00;03 (Full).zip
  60. -rwxrwxrwx 1 admin users 137764807 Sep 27 00:04 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-27 00;00;03 (Full).zip
  61. -rwxrwxrwx 1 admin users 139063256 Sep 28 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-28 00;00;03 (Full).zip
  62. -rwxrwxrwx 1 admin users 140365349 Sep 29 00:03 OpenVPN + HTDOCS + Apache conf+ exported databases backup to NAS01 2017-09-29 00;00;03 (Full).zip
  63.  
  64.  
  65. CurrentEncoding BaseStream EndOfStream
  66. --------------- ---------- -----------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement