Skip to content

Instantly share code, notes, and snippets.

@yujinlin0224
Last active March 12, 2023 07:26
Show Gist options
  • Save yujinlin0224/727db28e328dc331c1e3b75232b9826a to your computer and use it in GitHub Desktop.
Save yujinlin0224/727db28e328dc331c1e3b75232b9826a to your computer and use it in GitHub Desktop.
Download Lastest Nvidia Driver
$ServiceBaseUrl = "https://gfwsl.geforce.com/services_toolkit/services/com/nvidia/services/AjaxDriverService.php"
$ServiceUrlBuilder = [System.UriBuilder]::new($ServiceBaseUrl)
$ServiceUrlQuery = [System.Web.HttpUtility]::ParseQueryString($ServiceUrlBuilder.Query)
$ServiceUrlQuery.Add("func", "DriverManualLookup")
$ServiceUrlQuery.Add("psid", 120) # Geforce RTX 30 Series
$ServiceUrlQuery.Add("pfid", 929) # Geforce RTX 3080
# $ServiceUrlQuery.Add("osID", 57) # Windows 10
$ServiceUrlQuery.Add("osID", 135) # Windows 11
$ServiceUrlQuery.Add("languageCode", 1028) # Chinese, Taiwan
$ServiceUrlQuery.Add("beta", 0)
$ServiceUrlQuery.Add("isWHQL", 1)
$ServiceUrlQuery.Add("dch", 1)
$ServiceUrlQuery.Add("sort1", 0) # most recent first
$ServiceUrlQuery.Add("numberOfResults", 1)
$ServiceUrlBuilder.Query = $ServiceUrlQuery.ToString()
$ServiceUrl = $ServiceUrlBuilder.Uri.AbsoluteUri
$DownloadUrl = (Invoke-WebRequest $ServiceUrl | ConvertFrom-Json).IDS.downloadInfo[0].DownloadURL
$Filename = [System.IO.Path]::GetFileName($DownloadUrl)
$FilePath = Join-Path $PSScriptRoot $Filename
Invoke-WebRequest $DownloadUrl -OutFile $FilePath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment