COV-ID-19 PowerShell Prompt

Information sometimes helps. COV-ID-19 information is currently everywhere, so i thought, why not on the PS Prompt ? This is a guide, on how to get current COV-ID-19 Data everytime you open a new PowerShell host.

Step 1 – API Key to access RapidApi

Register for an API Key at https://rapidapi.com. Therefor create an account, go to your personal dashboard and create a new App in „MyApps“.

Then go to the Coronavirus-Moitor of RapidAPI https://rapidapi.com/astsiatsko/api/coronavirus-monitor and test your API Key with the latest_stat_by_country query as in the screenshot below.

If you get a response in step 4, your API key is ready. Copy the API Key from your personal dashboard in the clipboard.

Step 2 – Test REST-API Connection from Powershell

If you have data in the $response variable, this worked.

Step 3 – Customize $profile

Find your profile by typing in $profile. Edit it with your favourite editor (VS-Code in my case) and add the following code to your profile. Please dont forget to change the x-rapidapi-key value to your RapidAPI key and the country of your choice.

Next time you open a new Powershell prompt, something like the below should appear on your screen.

I hope you find this useful – Roman

Latest Comments

  1. lukeleigh 28. März 2020
    • rneumann 30. März 2020