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
#Requires -Modules AzureRM.Automation, AzureRM.Profile, PowerShellGet | |
#Requires -version 5.0 | |
<# | |
============================================================================================= | |
AUTHOR: Tao Yang | |
DATE: 12/02/2017 | |
Version: 1.0 | |
Comment: deploy / update PowerShell modules from a PS Repository to Azure Automation Account | |
============================================================================================= | |
#> |
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
#requires -Version 5.0 -Modules AzureRM.OperationalInsights, AzureRM.profile | |
<# | |
============================================================================================================================ | |
AUTHOR: Tao Yang | |
DATE: 17-12-2016 | |
Version: 1.0 | |
Comment: | |
- Create OMS saved searches to that map SCOM ACS reports that are | |
- Listed in Wei Hao Lim's blog post: | |
- https://blogs.msdn.microsoft.com/wei_out_there_with_system_center/2016/07/25/mapping-acs-reports-to-oms-search-queries/ |
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
#requires -Version 2.0 -Modules OMSDataInjection | |
<# | |
======================================================================== | |
AUTHOR: Tao Yang | |
DATE: 02/11/2016 | |
Version: 1.0 | |
Comment: | |
Azure Automation Runbook that reads Windows Event export (evt) files | |
and inject events to OMS Log Analytics. |
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
<# | |
================================================================================ | |
AUTHOR: Tao Yang | |
DATE: 30/11/2016 | |
Version: 1.0 | |
Comment: Sample code for using AzureTableEntity PowerShell module | |
Project Repo: https://github.com/tyconsulting/AzureTableEntity-PowerShell-Module | |
================================================================================ | |
#> |
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 System.Net; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading.Tasks; | |
using System.IO; | |
using System.Text; | |
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) | |
{ | |
log.Info($"C# HTTP trigger proxy function processed a request. RequestUri={req.RequestUri}"); |
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
$requestBody = Get-Content $req -Raw | ConvertFrom-Json | |
$subscriptionId = $requestBody.subscriptionid | |
if ($req_query_subscriptionid) | |
{ | |
$subscriptionId = $req_query_subscriptionid | |
} | |
if ($subscriptionId -eq $null) | |
{ |