From ce4294555343c3e2d7af1edbec9764948b5beba2 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 22 Feb 2024 09:47:20 +0000 Subject: [PATCH] Combine PowerShell Functions into 1 script for RMM --- EasyWarrantyCheck_RMM.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/EasyWarrantyCheck_RMM.ps1 b/EasyWarrantyCheck_RMM.ps1 index 3d19618..bad6491 100644 --- a/EasyWarrantyCheck_RMM.ps1 +++ b/EasyWarrantyCheck_RMM.ps1 @@ -1182,7 +1182,11 @@ function Get-WebDriver { Get-WebDriver #> - $webdriverurl = "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/120.0.6099.109/win64/chromedriver-win64.zip" + # Retrieve JSON content from the URL + $jsonUrl = "https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json" + $jsonString = Invoke-RestMethod -Uri $jsonUrl + # Find the URL for chromedriver for win64 platform in the stable channel + $webdriverurl = $jsonString.channels.Stable.downloads.chromedriver | Where-Object { $_.platform -eq "win64" } | Select-Object -ExpandProperty url $WebDrivertemp = "C:\temp" $WebDriverPath = "C:\temp\chromedriver-win64" $driverExists = Test-Path (Join-Path $WebDriverPath "chromedriver.exe")