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
$ServicePrincipalConnection = Get-AutomationConnection -Name 'AzureRunAsConnection' | |
$null = Add-AzureRmAccount ` | |
-ServicePrincipal ` | |
-TenantId $ServicePrincipalConnection.TenantId ` | |
-ApplicationId $ServicePrincipalConnection.ApplicationId ` | |
-CertificateThumbprint $ServicePrincipalConnection.CertificateThumbprint | |
################################################################## | |
################################################################## |
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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"location": { | |
"type": "string", | |
"metadata": { | |
"description": "Deployment location" | |
}, | |
"defaultValue": "australiaeast" |
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
### RUN AS ADMINISTRATOR | |
# This script here string, will be copied to the local computer to be run locally | |
# Change the variables in this script, they are at the top in this here string | |
$script = @' | |
# Testing, $args is an array object ($args | Out-File "C:\Scripts\PerformanceAlert.txt" –Append) | |
######################################### | |
# Replace with your Workspace ID | |
$LogAnalyticsCustomerID = "Workspace ID" |
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
# Replace with your Workspace ID | |
$CustomerID = $REQ_PARAMS_LogAnalyticsCustomerID | |
# Replace with your Log Analytics workspace Primary Key | |
$SharedKey = $REQ_PARAMS_LogAnalyticsPrimaryKey | |
#Specify the name of the record type that we'll be creating. | |
$LogType = $REQ_PARAMS_LogType # To be used to search for as a custom log e.g. Type=iTunesPopCharts2_CL | |
# Specify a time in the format YYYY-MM-DDThh:mm:ssZ to specify a created time for the records | |
$TimeStampField = '' | |
# Telstra DEV APIs - https://dev.telstra.com | |
$Telstra_app_key = $REQ_PARAMS_Telstra_app_key |
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
### RUN AS ADMINISTRATOR | |
# This script here string, will be copied to the local computer to be run locally | |
# Change the variables in this script, they are at the top in this here string | |
$script = @' | |
# Replace with your Workspace ID | |
$LogAnalyticsCustomerID = "Workspace ID" | |
# Replace with your Log Analytics workspace Primary Key | |
$LogAnalyticsPrimaryKey = "workspace Primary Key" |
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
# Replace with your Workspace ID | |
$CustomerID = $REQ_PARAMS_LogAnalyticsCustomerID | |
# Replace with your Log Analytics workspace Primary Key | |
$SharedKey = $REQ_PARAMS_LogAnalyticsPrimaryKey | |
#Specify the name of the record type that we'll be creating. | |
$LogType = $REQ_PARAMS_LogType # To be used to search for as a custom log e.g. Type=iTunesPopCharts2_CL | |
# Specify a time in the format YYYY-MM-DDThh:mm:ssZ to specify a created time for the records | |
$TimeStampField = '' | |
# Telstra DEV APIs - https://dev.telstra.com | |
$Telstra_app_key = $REQ_PARAMS_Telstra_app_key |
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
#region variables | |
# Replace with your Workspace ID | |
$CustomerID = 'Your_Workspace_Key' | |
# Replace with your Primary Key | |
$SharedKey = 'Your_OMS_Key' | |
#Specify the name of the record type that we'll be creating. | |
$LogType = 'Your_Log_Name' # To be used to search for as a custom log e.g. Type=iTunesPopCharts2_CL | |
# Specify a time in the format YYYY-MM-DDThh:mm:ssZ to specify a created time for the records | |
$TimeStampField = '' | |
#endregion |
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
configuration Main | |
{ | |
param | |
( | |
[string]$JukeboxID = "localhost", | |
[string]$nodeName = $env:COMPUTERNAME, | |
[string]$VNCKey | |
) | |
#Import-DscResource -Name 'xRemoteFile' -ModuleName '.\xPSDesiredStateConfiguration' |
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
# Login to Azure manually | |
Clear-AzureRmContext -Scope CurrentUser -Force | |
Login-AzureRmAccount -TenantId '<Your Azure Tenant ID>' # Microsoft | |
### Choose Subscription | |
$subscription = Get-AzureRmSubscription | Out-GridView -Title "Select the Azure subscription that you want to use ..." -PassThru | |
Select-AzureRmSubscription -SubscriptionId $subscription.id | |
# Fill in these variables |