From 0d89ed4e278b14c12d756962789927ae1cfe5963 Mon Sep 17 00:00:00 2001 From: Ashley How <28279067+AshleyHow@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:37:42 +0100 Subject: [PATCH 1/2] Add files via upload --- WindowsOSBuild.psd1 | Bin 37336 -> 37336 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/WindowsOSBuild.psd1 b/WindowsOSBuild.psd1 index bede0379314491545f05293cb0c157b183e50818..b267a6954c5f108f63abae49d63aa4c09252807e 100644 GIT binary patch delta 2854 zcmYM0xo+cD6o${Z3@{InF2Dc*2120Kl7%1`h}vcCy9G>Pi4tX5t4WCx8#XBdq)Ff^ z^*q7Ab*i*UKaZ2|a7Ho&k-Ybw^Z)-@crU+vy880z>W_cl#6SP%zIhXS$zT2b?w6jN zWGdHkBX^ROoixOey;x$1EgOD&d6bq^c{)f@`tnx3lXvn1wztxF`S9aEAFoSdvN(`2 zh7P7vS@3)>N6APHLmf|~Cpn2r1-dqCo9EQ8Kl@AQ7BYuo%u|!qnUp1sm>PI%W@|{< zvlc=?iuEGvbDk0~y3Ds^C?408JV^2)t_H_U>Tn;B+(LmZF$Bl(eqgPSf{4_803W3U z&>e)NvkTQM^WVsOTkafa0dlAybcLHsL zxhB^nd|B=;a}n_;L?0$ARh(1kwPp29NQ{*j)HbFoDR3VFH4U<1AnHIIO`vLA_h7hW zYlXxyUiaLy-KHLS1c$)N<5}`?E~97){hA03V(u|lg&<6f4iGC6-^0Rz zaKXJzj0r|Ag0)P$Ktc)62INg}+E|&4!iYVQStIZ{3rS#Q5qkomeiZsBvFspkGLjBgQAP5TPUw%rEFIP3au37IkeASquL#mNO9cARdTQdvF}chB(gw zwOFlSe^0F14N<^{2&mvup=4IjwowE+SR2eXxN5^{UUDQq&ZxlZMw&i~L+Cu$#s$tp zX@fYAz{fDZV{{L+x|H~9?{;v`1dTKR!2&ixdM2*+ZO!YCuHcM6I%Qp!MkFQ0##Tz&5Wq^KU6 zqnDT(Qh5I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+s5i`I{jJp{B2T*%llJ|{aUawF1n4D_wVe^}4vc5KOoJUW zThuLQleEfkh~bNnHFoVFT|qknJO_1P{tRBXUJ8K~M(Q9E(s=#!i+%g;j1HWzZ${AR zN>!KM%MZT>J`_n~u~23t8!{iq)F`U5P(5Nv2Ko(jQ-1ZRGwxSxV7ke3$~V5vToc4s z_6~K_rTFsn?wzMA;0``@BT8G6Ke&1 zW})O_Mh`*+=yddk%J?y$oly6%x&iNeskIA-#^!&M8p7K!yZulmL0NRg-5 zGbI{Wux5NsD>)HJKO}BOLLDg}uy+-*rgKr30YT%lrt$FTgWJC}!LcAW01sZ*Eq>BscQWH<~ zy=CL~%p*k!vIHLJMl(nf!c;vO>PTACiZCv;33C3UwIMn(S|FuEb-Ema)D;Ci+F~Sx z@H2=lxFwG0_SQE~9Q+Qsk05LWoxtnbDZss=O?nnxgp4JpFEc&7o`LFtTjs7UIHCEG zWLu2NA?N`0GbwCR9>9c=tXsLyQwX^Z*tYMUZu-UFWzm} T)`;4jgY-lkN6*V2zrX(%+*R0- From ff61dfb9d5ecf45c12a6fea90949e4984dfbd6a9 Mon Sep 17 00:00:00 2001 From: Ashley How <28279067+AshleyHow@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:38:05 +0100 Subject: [PATCH 2/2] Add files via upload --- Public/Get-LatestOSBuild.ps1 | 77 ++++++++++++++---------------------- 1 file changed, 30 insertions(+), 47 deletions(-) diff --git a/Public/Get-LatestOSBuild.ps1 b/Public/Get-LatestOSBuild.ps1 index 33f2923..0710ca1 100644 --- a/Public/Get-LatestOSBuild.ps1 +++ b/Public/Get-LatestOSBuild.ps1 @@ -161,33 +161,16 @@ Return $ArrayList } - Function Get-ChromeUserAgent { - # Define the URL to fetch the latest Chrome version - $LatestChromeUserAgentURL = "https://www.whatismybrowser.com/guides/the-latest-user-agent/chrome" - - # Send a GET request to the URL and parse the HTML - $LatestChromeUserAgentResponse = Invoke-WebRequest -Uri $LatestChromeUserAgentURL -UseBasicParsing -ErrorAction SilentlyContinue - $HTMLLatestChromeUserAgent = $LatestChromeUserAgentResponse.Content - - # Extract the latest Chrome version from the HTML - $RegexPattern = 'Chrome/([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)' - $ChromeUserAgentLatestVersion = [regex]::Match($HTMLLatestChromeUserAgent, $RegexPattern).Groups[1].Value - - # Construct the user agent string - $UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/$($ChromeUserAgentLatestVersion) Safari/537.36" - Return $UserAgent - } - # Obtain data from webpage Try { If ($OSName -eq "Server2022" -or $OSName -eq "Server2022Hotpatch") { - $Webpage = Invoke-WebRequest -Uri $URL -UseBasicParsing -UserAgent $(Get-ChromeUserAgent) -ErrorAction Stop + $Webpage = Invoke-WebRequest -Uri $URL -UseBasicParsing -ErrorAction Stop } Else { - $Webpage = Invoke-RestMethod -Uri $URL -UseBasicParsing -UserAgent $(Get-ChromeUserAgent) -ErrorAction Stop + $Webpage = Invoke-RestMethod -Uri $URL -UseBasicParsing -ErrorAction Stop # Fetch the Atom feed content, used to obtain preview and out-of-band data - $response = Invoke-WebRequest -Uri $AtomFeedUrl -Method Get -UseBasicParsing -UserAgent $(Get-ChromeUserAgent) -ErrorAction Stop + $response = Invoke-WebRequest -Uri $AtomFeedUrl -Method Get -UseBasicParsing -ErrorAction Stop # Extract raw content from the response $feedContent = $response.Content @@ -250,7 +233,7 @@ # Support for Hotpatch If ($null -eq $Update.OSBuild) { Try { - $UpdateURLWebpage = Invoke-WebRequest -Uri $Update.InfoURL -UseBasicParsing -UserAgent $(Get-ChromeUserAgent) -ErrorAction Stop + $UpdateURLWebpage = Invoke-WebRequest -Uri $Update.InfoURL -UseBasicParsing -ErrorAction Stop } Catch { If ($_.Exception.Message -like '*403*') { @@ -536,8 +519,8 @@ # SIG # Begin signature block # MIImcgYJKoZIhvcNAQcCoIImYzCCJl8CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcC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