PowerShell your world cup

June 17, 2013

Table of Contents

PowerShell This is something that is very exciting and if you are interested you should try it. I found the post and tried it. Here is a function and how you use them.

  • Go to the kimono website and sign up for an account(http: //www.kimonolabs.com/signup)

This will get you an APIKey. Click your name once after you have logged in and then select your account.

  • Copy the API key and paste it below in the script and enjoy!

The Functions



Function Get-WorldCupPlayer ($Country) {

    If ($Country) {

        $TeamID = (Get-WorldCupTeam -Country $Country).id

        Invoke-WebRequest -Uri (“http://worldcup.kimonolabs.com/api/players?teamId=$($TeamID)&apikey=$($ApiKey)”) | ConvertFrom-Json

    } Else {

        Invoke-WebRequest -Uri “http://worldcup.kimonolabs.com/api/players?apikey=$($ApiKey)” | ConvertFrom-Json



Function Get-WorldCupTeam ($Country, $TeamID) {

    If ($Country) {

        Invoke-WebRequest -Uri (“http://worldcup.kimonolabs.com/api/teams?name=$($Country)&apikey=$($ApiKey)”) | ConvertFrom-Json


    If ($TeamID) {

        Invoke-WebRequest -Uri (“http://worldcup.kimonolabs.com/api/teams?id=$($TeamID)&apikey=$($ApiKey)”) | ConvertFrom-Json



    If (!$country -and !$TeamID) {

        Invoke-WebRequest -Uri “http://worldcup.kimonolabs.com/api/teams?apikey=$($ApiKey)” | ConvertFrom-Json



Function Get-WorldCupStat {

    Invoke-WebRequest -Uri (“http://worldcup.kimonolabs.com/api/teams?sort=goalsFor,-1&apikey=$($ApiKey)”) | ConvertFrom-Json


Bring on the World Cup Fun

#Display the best team in the World Cup

Get-WorldCupTeam -Country “England”

Get-WorldCupStat | Format-Table

Get-WorldCupPlayer | Format-Table

Get-WorldCupPlayer -Country “England” | Format-Table

#Who has scored the most goals in the Netherland team so far?

Get-WorldCupPlayer -Country “Netherlands” | Foreach { $_ | Where

{ $_.goals -gt 0 } | Select firstName, lastName, goals } | sort goals –


#View the Logo of the team who is going to win

$logo = (New-Object System.Net.WebClient).DownloadFile(((Get-WorldCupTeam -Country “England”).logo), ($env:TEMP + “Logo.png”))

Invoke-Item $env:TEMPLogo.png


Share on
More posts

Dedicated Servers Quick Guide

What is a Dedicated Servers? Why bother using a dedicated server over a VPS or Shared Hosting?A dedicated server is a server 100% dedicated to your website/project or business needs.

Release: Veam Backup & Replication 6.5

For those not aware, there has been a new release of the Veam Backup & Replication 6.5. It’s very interesting, the first backup solution for vSphere 5.1 and windows Server

Dedicated Server or VPS Server?

What is the difference between Dedicated Server or VPS Server?In short, VPS hosting works on a virtual shared server, where you host your website alongside others; dedicated hosting, meanwhile, gives

Get 90% Discount

First 3 People gets the Bonus!
Don't Miss Out Our Big Sale

Get 0-90% On All
247Rack Services


The Sale Is Until The End Of March