Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I am trying to use the following code

 

Invoke-WebRequest -Uri 'webpage' -Method POST -InFile "c:\test.txt"

 

But no matter what I do I get the following errors:

 

Invoke-WebRequest : HTTP Error 405.0 - Method Not Allowed

or

Exception calling "UploadFile" with "3" argument(s): "The remote server returned an error: (404) Not Found."

 

Please don't suggest any other methods as due to security set in place. Can anyone suggest what is wrong or where I can look to start troubleshooting this problem. I've granted access via BITS for upload and user has correct permission on the folder. Webpage resolves OK if I put it into browser. I'm kind of stuck now and need a second pair of eyes.

 

OR am I doing this completely wrong?

 

Thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...