This file contains 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
# POST method: $req | |
$requestBody = Get-Content $req -Raw | ConvertFrom-Json | |
$name = $requestBody.name | |
$instrumentationKey = "<ai key>" | |
$aiClient = New-Object "Microsoft.ApplicationInsights.TelemetryClient" | |
$aiClient.InstrumentationKey = $instrumentationKey | |
$aiClient.TrackPageView("my pageview") | |
#$aiClient.TrackEvent("my event") |
This file contains 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
using Microsoft.ServiceBus.Messaging; | |
using StackExchange.Redis; | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace SendingEvents2EventHub |
This file contains 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
$resourceGroupName = "pscmdletResourceGroup" | |
$appServicePlanName = "pscmdletServicePlan" | |
$newWebsiteName = "pscmdletWebsite" | |
$location = "West US" | |
$error.clear() | |
write-host "trying to load azure dlls" |
This file contains 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
write-host "trying to load azure dlls" | |
Import-module azure | |
write-host "trying to log into Azure" | |
#Select-AzureSubscription -Default "Microsoft Azure Internal Consumption" | |
#Add-AzureAccount | |
#Login-AzureRmAccount | |
write-host "trying to get website details" | |
# Get-AzureRMResource -ResourceType "microsoft.web/sites" -ResourceGroupName $ResourceGroupName -ResourceName $WebsiteName |