I searched a lot on Google, but most scripts are not working or only showing the link speed from the network card (100/1000). I would like to do a speedtest with PowerShell so I can include the internet speed in my report. Is that possible?
I'm still a newbie on PowerShell (19 years old), so I'm sorry if this is easy to make. 🙂

Before considering implementation for a speedtest, you need to define what you mean when you say network speed. How do you define network speed (is it pure upload/download speed for TCP communication between computer A and B or is it something else you're looking for) and between which endpoints (exactly which computers are you going to use and are they two computers on same local network, other country, other side of the globe)?

To calculate pure upload and download speed is pretty easy, especially if you have control over both the server and the client. Just make UploadFile and DownloadFile requests (which you can do using the Invoke-WebRequest cmdlet or the HttpClient or WebClient .NET classes), measure the time it takes and divide the file size with the time measured. Do be sure to upload both small and slightly larger files, to account for connection opening and similar.

However, if the server is not yours and you keep downloading and uploading a lot of large dummy files (especially if you run it from several different machines at the same time) it could be considered less nice (bordering on DOS-attack, possibly?), in which case I suggest contacting the server owner before doing any such thing.

Speedtest.net is a flash application, so it's not really a great fit for controlling via PowerShell. In theory you could automate the webbrowser to start the speedtest.net test and once it's done somehow get the data out of the flash application (either if it's available through some javascript calls to the flash API, peeking into the flash gui objects or by doing OCR on the flash GUI displaying the numbers). I do, however, believe that this would be a lot more difficult (have never tried controlling flash applications from PowerShell so I can't make any educated comments on the difficulty level) than just making the calculations yourself (which should be pretty easy, once you know which server you want to communicate with).