Function to query catalog
Add a function to query the catalog by product ID.
This commit is contained in:
parent
08b1c963d8
commit
6f50cb3c37
1 changed files with 9 additions and 0 deletions
|
|
@ -314,3 +314,12 @@ function Start-IIS(
|
|||
|
||||
Start-Process -Wait -NoNewWindow -FilePath "${env:ProgramFiles}\IIS Express\iisexpress.exe" -ArgumentList $iis_args
|
||||
}
|
||||
|
||||
function Get-ProductById(
|
||||
[string]$ProductId,
|
||||
[string]$Market='US',
|
||||
[string]$Language='en-US')
|
||||
{
|
||||
$x = Invoke-WebRequest "https://displaycatalog.md.mp.microsoft.com/products/$($ProductId)?fieldsTemplate=Full&market=$($Market)&language=$($Language)" -Headers @{ 'MS-Contract-Version'=5; }
|
||||
return convertfrom-json $x.Content
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue