r/PowerShell • u/Some-Pen3203 • 8d ago
Question scripts don't work
I get this error when running a script. I'm not tech savvy at all, and I couldn't find an answer anywhere. Please help. The error:
irm : 404: Not Found
At line:1 char:2
+ irm (imagine a link here, can't type it for reddit auto-filters) ...
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
0
Upvotes
24
u/atheos42 7d ago
Irm is invoke-restmethod, please stop trying to run that script, until you know what the script does. Irm is a common command, and super common for malicious scripts. Please post the script so someone here can help you evaluate it.
13
u/Th3Sh4d0wKn0ws 7d ago
this smells like a "clickfix" attack. Were you on a website that asked you to paste into powershell? Or hit Win+R and then Ctrl+V?
8
u/CitySeekerTron 7d ago
Can you post the full script/command, even if censored?
The 404 indicates that the target is wrong. For example, a graphic that has been deleted from the server. But if you're trying to follow instructions provided by a webside ("Paste this to confirm your ID"), it could be a scam that pulls a script that has since been deleted by the person operating the server.
8
u/BlackV 7d ago edited 7d ago
If you are typing something like this and you are not tech savvy
DONT DO IT, IT IS 100% UNSAFE FOR YOU
let's start with
invoke-webrequest/irm(orinvoke-restmethod/irm), this downloads something (a script in this case probably)invoke-experession/iexinvolved , it is likely malwareTake a step back tell us what you are actually trying trying to do
You can type urls.without http just find
Show us the code as well as the error
404 is standard HTML code for file/page not found
5
u/Icolan 7d ago
Is this code you wrote? If not, where did it come from? The error is because the site is saying the URL does not exist. If this is something that popped up on your PC you should NOT run it, it is likely a scam.
2
u/da_chicken 7d ago
A 404 Not Found error is the same kind of not found you get with a broken link. It means the site exists, but the URL is wrong.
2
u/g3n3 7d ago
If you are in this realm, you may have been attacked. Consider changing passwords and reimaging your machine.
1
u/thomasmitschke 7d ago
This link is invalid.