Skip to content

Instantly share code, notes, and snippets.

Marc Kean marckean

  • Microsoft
  • Sydney, Australia
Block or report user

Report or block marckean

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ShutdownDevTestVMs - Logic App.json
{
"$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",
View LogicApps Stop-Azure-VMs-Parameter.ps1
param
(
[parameter(Mandatory=$true)]
[String] $VMnames
)
$ServicePrincipalConnection = Get-AutomationConnection -Name 'AzureRunAsConnection'
$null = Add-AzureRmAccount `
-ServicePrincipal `
View LogicApps Get-All-VMs.ps1
$ServicePrincipalConnection = Get-AutomationConnection -Name 'AzureRunAsConnection'
$null = Add-AzureRmAccount `
-ServicePrincipal `
-TenantId $ServicePrincipalConnection.TenantId `
-ApplicationId $ServicePrincipalConnection.ApplicationId `
-CertificateThumbprint $ServicePrincipalConnection.CertificateThumbprint
##################################################################
##################################################################
View Runbook-Get list of Azure VMs running along with tags
$ServicePrincipalConnection = Get-AutomationConnection -Name 'AzureRunAsConnection'
Add-AzureRmAccount `
-ServicePrincipal `
-TenantId $ServicePrincipalConnection.TenantId `
-ApplicationId $ServicePrincipalConnection.ApplicationId `
-CertificateThumbprint $ServicePrincipalConnection.CertificateThumbprint
##################################################################
##################################################################
View CiscoASAv-BYOL4NICHA_25.json
{
"$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"
View Scheduled Task, perfmon trigger.ps1
### 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"
View Azure Functions, event log trigger.ps1
# 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
View Scheduled Task, event log trigger.ps1
### 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"
View EventDrivenAzureFunction.ps1
# 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
View Log Analytics Data Collector API.ps1
#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
You can’t perform that action at this time.