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
if($global:WebAdmin -eq $null) { | |
$global:WebAdmin = @{} | |
} | |
# http://stackoverflow.com/questions/1183183/path-of-currently-executing-powershell-script | |
$root = Split-Path $MyInvocation.MyCommand.Path -Parent; | |
$global:WebAdmin.ProcDumpLocalPath = "$root\Resources\procdump.exe" | |
<# |
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
############## https://notsomany.wordpress.com/2017/12/08/iis-logs-to-sql-database-using-powershell-and-log-parser/ | |
$dbserver = "$env:COMPUTERNAME,1433" | |
$database = "iislogs" | |
$proxyserver = "<your-web-server>" | |
$ErrorActionPreference = "Stop" | |
$Error.Clear() | |
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
SET NUMERIC_ROUNDABORT OFF | |
GO | |
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON | |
GO | |
SET XACT_ABORT ON | |
GO | |
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE | |
GO | |
BEGIN TRANSACTION |
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<RaiseFault async="false" continueOnError="false" enabled="true" name="DevPortal-Response"> | |
<DisplayName>DevPortal Response</DisplayName> | |
<Properties/> | |
<FaultResponse> | |
<Set> | |
<Headers> | |
<Header name="Location">https://devportal.yoursite.com</Header> | |
</Headers> | |
<Payload contentType="application/json"> |
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
use IisLogs | |
go | |
/****************************************************************** | |
AWS ALB DIMENSION: New Connections | |
******************************************************************/ | |
declare @dateStart varchar(10) = '2018-07-18', |
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
use IisLogs | |
go | |
/****************************************************************** | |
AWS ALB DIMENSION: Mbps per Hour | |
******************************************************************/ | |
declare @dateStart varchar(10) = '2018-07-18', |
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
use IisLogs | |
go | |
/****************************************************************** | |
AWS ALB DIMENSION: Active Connections per Minute by Hour | |
******************************************************************/ | |
declare @dateStart varchar(10) = '2018-07-18', |
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
USE [IisLogs] | |
GO | |
/****** Object: Table [dbo].[ProxyWebApps] Script Date: 9/2/2018 6:48:43 PM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO |
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
insert into [dbo].[ProxyWebAppCounts] | |
select SiteName, count(*) [WebAppCount] | |
from [dbo].[ProxyWebApps] |
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
USE [IisLogs] | |
GO | |
/****** Object: Table [dbo].[ProxyWebAppCounts] Script Date: 9/2/2018 6:54:29 PM ******/ | |
CREATE TABLE [dbo].[ProxyWebAppCounts]( | |
[SiteName] [varchar](255) NOT NULL, | |
[WebAppCount] [int] NOT NULL, | |
CONSTRAINT [PK_ProxyWebAppCounts] PRIMARY KEY CLUSTERED | |
( | |
[SiteName] ASC |