My PowerShell command is not working

Hi, I hope you are doing well. I need help because my PowerShell command is not working and I do not understand why (I am a beginner).

There it is :
Get-Content d:\emci\recus-a-envoyer-2021.txt | ForEach-Object { $opts = -Split $_ Invoke-WebRequest -uri $opts[1] -OutFile ('d:\emci\recus2021'+$opts[0]) }

And the error message :
Unexpected token ‘Invoke-WebRequest’ in expression or statement.

Thank you for your help

David,
Welcome to the forum. :wave:t4:

When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

How to format code in PowerShell.org <---- Click :point_up_2:t4: :wink:

Could you please use a subject what gives a hint what your issue is about next time? :wink:

How does your input file look like? (You may post a few sanitized lines of it, formatted as code as well, please.)
And what do you actually want to achieve?

Regardless of all that: I’d recommend to ALWAYS read the help for the cmdlets you’re about to use completely including the examples to learn how to use them.