forked from himadanreddy/SQL-DBA-SCRIPTS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBruins_ClientDW_WhoIsActive.ps1
More file actions
24 lines (19 loc) · 906 Bytes
/
Bruins_ClientDW_WhoIsActive.ps1
File metadata and controls
24 lines (19 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<#
Author name: Bulent Gucuk
Created date: 3/1/2019
Purpose: This will kick of the execution of sp_whoisactive in the runbook that webhook created for
Example: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -NoProfile -WindowStyle Hidden -Command C:\PowerShell\ClientDW_WhoisActive\ClientDW_WhoIsActive.ps1
-Webhook = "https://s13events.azure-automation.net/webhooks?token=iDJ4n1rhqxstECwNaZ9QOY%2fSiI%2fAYEVrVZGcrGlrWXI%3d"
-Method = "Post"
Copyright © 2019, SSB, All Rights Reserved
#>
Param
(
[string] $Webhook,
[string] $Method
)
#For testing: Below webhook is for Boston Bruins runbook DBA_srv-bostonbruins-01_db-bostonbruins-prod_whoisactive
#$Webhook = "https://s13events.azure-automation.net/webhooks?token=iDJ4n1rhqxstECwNaZ9QOY%2fSiI%2fAYEVrVZGcrGlrWXI%3d"
#$Method = "Post"
$Result = Invoke-WebRequest -Uri $Webhook -Method $Method -UseBasicParsing
$Result