Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7768469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:55:17+00:00 2026-06-01T15:55:17+00:00

I am attempting to use FTP in Powershell to upload a file. I am

  • 0

I am attempting to use FTP in Powershell to upload a file. I am using FtpWebRequest later followed by GetRequestStream, but this method is returning an error:

“The requested FTP command is not supported when using HTTP proxy.”

I am indeed behind a proxy and required to be.

How can I upload via Powershell when behind a proxy?

This would be solely run from a .ps1 Powershell script.

I have also tried:

$webclient = New-Object System.Net.WebClient
$uri = New-Object System.Uri($server)

$webclient.UploadFile($uri, "C:\Test\1234567.txt")

Where $server and that file are valid. But that code returns this error:

"An exception occurred during a WebClient request."
At C:\Test\script.ps1:101 char:26
+     $webclient.UploadFile <<<< ($uri, "C:\Test\1234567.txt")
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

I also tried double backslashes in the file paths, didn’t help.

The proxy I am under only touches HTTP, and not FTP.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:55:18+00:00Added an answer on June 1, 2026 at 3:55 pm

    Are you sure your proxy supports FTP, or is it HTTP only? See this thread:

    FTP File Upload with HTTP Proxy

    For WebClient I’ve used this in the past although it was for HTTP use, but you could give it a try:

    $wc = New-Object System.Net.WebClient
    $wc.Headers.Add("User-Agent","Mozilla/4.0+")        
    $wc.Proxy = [System.Net.WebRequest]::DefaultWebProxy
    $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
    $wc.UploadFile($uri, "C:\Test\1234567.txt")
    

    Note that – “The UploadFile method sends a local file to a resource. This method uses the STOR command to upload an FTP resource. For an HTTP resource, the POST method is used.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been unsuccesfully attempting to upload an encrypted file to an FTP server,
I am attempting to use this method I've constructed to save the layer of
Attempting to use the data series from this example no longer passes the JSONLint
Attempting to use asp.net mvc's Action Result of File. So it would seem that
In attempting to use scipy's quad method to integrate a gaussian (lets say there's
I'm attempting to use the rest-client gem to post something, but for some reason,
I'm attempting to set up a windows-based FTP server using Apache FTPServer, however I
attempting to use this railscast as a guide: http://railscasts.com/episodes/197-nested-model-form-part-2?view=asciicast and running into this error:
I am attempting to use a findcontrol method to dynamically fill a drop down
I'm attempting to use C# as a scripting language using CSharpCodeProvider (using VS2010 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.