r/PowerShell • • 21d 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

19 comments sorted by

View all comments

5

u/Icolan 20d 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.

1

u/Some-Pen3203 16d ago

the url had been taken down the same day I triedto run it. it's since been moved in github.com/iFryno/RemoveWindowsAI by the guy who made it. Sorry for late reply, and thanks for the help!

1

u/Icolan 16d ago

You can simply download that PS1 file after you have reviewed it, you don't need to run it from Github.

In general, running scripts directly from the internet is a bad idea and you should not run anything unless you actually understand what it is going to do and are sure it is coming from a trusted source.

1

u/Some-Pen3203 15d ago

trust me, I spent almost an hour trying to find a download button before finding out that you supposedly have to use powershell. (please don't tell me I missed an obvious button)

1

u/Icolan 15d ago

You don't need to use a download button. Powershell is text. You just copy the raw text into a file on your system and name it with a .ps1 extension and you have a powershell script.

There is also a download button that will let you download a zip of an entire GitHub project.