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
param ( | |
$Organization, | |
$PrivateToken, | |
$ProjectFullPath | |
) | |
$query = @{ | |
query = '{ |
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
# Create single HttpClient | |
$client = [System.Net.Http.HttpClient]::new() | |
# Perform multiple GETs | |
foreach ($url in $urls) { | |
$clientResult = $client.GetStringAsync($url). | |
GetAwaiter(). | |
GetResult() | |
$clientResult | ConvertFrom-Json | |
} |
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
# Describe local image with Azure Cognitive Services Computer Vision API in PowerShell | |
$ComputerVisionAPILocation = "westeurope"; | |
$ComputerVisionAPIURL = "https://$ComputerVisionAPILocation.api.cognitive.microsoft.com/vision/v2.0"; | |
$ComputerVisionAPIKey = "YOUR_KEY_GOES_HERE"; | |
$ComputerVisionAPIAnalyzeTemplateURL = ($ComputerVisionAPIURL + "//describe?maxCandidates={0}") | |
$maxCandidates = 10; | |