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
{ | |
"$connections": { | |
"value": { | |
"azureautomation": { | |
"connectionId": "/subscriptions/6bb00255-5486-4db1-96ca-5baefc18b0b2/resourceGroups/OutlookApprovalLogic/providers/Microsoft.Web/connections/azureautomation", | |
"connectionName": "azureautomation", | |
"id": "/subscriptions/6bb00255-5486-4db1-96ca-5baefc18b0b2/providers/Microsoft.Web/locations/australiaeast/managedApis/azureautomation" | |
}, | |
"office365": { | |
"connectionId": "/subscriptions/6bb00255-5486-4db1-96ca-5baefc18b0b2/resourceGroups/OutlookApprovalLogic/providers/Microsoft.Web/connections/office365", |
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
param | |
( | |
[parameter(Mandatory=$true)] | |
[String] $VMnames | |
) | |
$ServicePrincipalConnection = Get-AutomationConnection -Name 'AzureRunAsConnection' | |
$null = Add-AzureRmAccount ` | |
-ServicePrincipal ` |
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
### Variables | |
$dropboxDBfile = Get-ChildItem -Path $env:USERPROFILE\AppData\Local -Recurse -ErrorAction SilentlyContinue | ? {$_.Name -eq 'host.db'} | |
$base64path = gc $dropboxDBfile.FullName | select -index 1 | |
$dropboxPath = [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($base64path)) # convert from base64 to ascii | |
$taskName = "Keep_WiFi_Connected" | |
$Path = 'PowerShell.exe' | |
$Arguments = "-ExecutionPolicy Unrestricted -File c:\StartLTE-WiFi.ps1" | |
$Service = new-object -ComObject ("Schedule.Service") |
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
#region Install Modules | |
# Run as Administrator | |
#Find-Module AzureServicePrincipalAccount | Install-Module | |
#endregion | |
# Retrieve Azure Module properties | |
"" | |
"Validating installed PowerShell Version and Azure PowerShell Module version..." |
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 = @' | |
# Testing, $args is an array object ($args | Out-File "C:\Scripts\PerformanceAlert.txt" –Append) | |
######################################### | |
# Replace with your Workspace ID | |
$LogAnalyticsCustomerID = "Workspace ID" |