I began my Bitcoin journey in 2012, with CPU mining, back when that was still profitable. Some of you are just now joining the cryptocurrency wave, and that’s fine. Like all waves it will feel great while rising and will feel horrible while falling.
But, since we are working in the “Now”, let’s get some work done.
We want the price of bitcoin, in 3 currencies, from our PowerShell console window. Let’s get it.

We begin, as we often do in these tutorials, with assigning the $zurl variable to identify our data source within PowerShell.

Above we enabled TLS 1.2, to ensure compatibility with our data source’s SSL configuration.

Above we download our dataset as the variable $zdata, using “Invoke-RestMethod” and our previously set $zurl variable.

Above we extract the pricing section of our dataset, leaving the rest for exploration & use at another time. If you were curious about what other data was there, here you go:

Now let’s separate out our data into formats that we can display for human beings in a format they will easily understand.

And then lets display that data, complete with proper naming of the currency (taken from our current dataset)

That looks jumbled, so we probably want to wrap the entire thing in a function. You can do that by placing this on the first line of your script, by itself, “function coinprice(){“, and then by placing this on the last line of your script, again by itself, “}”.
Note: The last item works when on the last line of your actual “code” but this way is cleaner, is more readable, and syntax errors are less likely.

And there you have it. Once you store the script in a function, and run the function, you are left with an easy-to-use command which returns the current pricing of Bitcoin in 3 currencies (The United States Dollar, The Euro, and The British Pound), as reported by Coindesk.
I am sure your wheels are already turning, fellow scripters.
Now go use this knowledge (i.e. Power) for Good instead of Evil.
Also: If you found this article valuable, drop a tip here: https://cash.app/$Zeaun
