Last active
April 8, 2019 06:19
-
-
Save dgosbell/3b77a463d2f6222c9c50725147e4031f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
This script checks a local Power BI Report Server instance against the version | |
currently available for download and reports if the two versions are no the same. | |
.Notes | |
Author: Darren Gosbell | |
Date: 8 April 2019 | |
.Example | |
.\Compare-PbirsVersions.ps1 https://myserver/reportserver | |
#> | |
param([string] $localServer = "http://localhost/reportserver" ) | |
$download = "http://aka.ms/pbireportserver" | |
$serverhtml = Invoke-WebRequest -Uri $localServer -UseBasicParsing -UseDefaultCredentials | |
$serverhtml.Content -match "Microsoft Power BI Report Server Version (\d*\.\d*\.\d*\.\d*)" > $NULL | |
$localVersion = $Matches[1] | |
$downloadhtml = Invoke-WebRequest -Uri $download -UseBasicParsing | |
$downloadhtml.Content -match "<p>(\d*\.\d*\.\d*\.\d*)</p>" > $null | |
$downloadVersion = $Matches[1] | |
if ($localVersion -eq $downloadVersion) {Write-Host -ForegroundColor Green "Running the lastest version of PBIRS - $localVersion"} | |
else {Write-Host -ForegroundColor Yellow "local version of PBIRS - $localVersion | |
does not match download version - $downloadVersion"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment