Created
December 16, 2022 10:18
-
-
Save Howard20181/58316a78978990145ac73884e3f02f68 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
$appId = "" | |
$appSecret = "" | |
$body = @{ | |
grant_Type = "client_credentials" | |
scope = "https://graph.microsoft.com/.default" | |
client_Id = $appId | |
client_Secret = $appSecret | |
} | |
$appName = "Windows Subsystem for Android" | |
$storeSearchUrl = "https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch" | |
$body = @{ | |
Query = @{ | |
KeyWord = $appName | |
MatchType = "Substring" | |
} | |
} | ConvertTo-Json | |
$appSearch = Invoke-RestMethod -Uri $storeSearchUrl -Method POST -ContentType 'application/json' -body $body | |
$exactApp = $appSearch.Data | Where-Object { $_.PackageName -eq $appName } | |
$appUrl = "https://storeedgefd.dsx.mp.microsoft.com/v9.0/packageManifests/9P3395VX91NR" -f $exactApp.PackageIdentifier | |
$app = Invoke-RestMethod -Uri $appUrl -Method GET | |
$appId = $app.Data.PackageIdentifier | |
$appInfo = $app.Data.Versions[-1].DefaultLocale | ConvertTo-Json | |
$appInstaller = $app.Data.Versions[-1].Installers | |
Write-Host "appId: $appId" | |
Write-Host "appInfo: $appInfo" | |
Write-Host "appInstaller: $appInstaller" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment