Created
May 28, 2017 22:50
-
-
Save krnese/3281ea35ef1d13d5970cd11bc4c138e4 to your computer and use it in GitHub Desktop.
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
# Webhook and runbook details | |
$WebhookName = 'OMS Alert Remediation ' + [System.Guid]::NewGuid().toString() | |
$RunbookName = 'ManagedIaaSBackup' | |
$WorkspaceName = 'AzureScaleWorkspace' | |
# Create Webhook for Runbook | |
$Webhook = New-AzureRmAutomationWebhook ` | |
-Name $WebhookName ` | |
-IsEnabled $True ` | |
-ExpiryTime (Get-Date).AddYears(2) ` | |
-RunbookName $RunbookName ` | |
-ResourceGroup $ResourceGroup ` | |
-AutomationAccountName $AutomationAccount ` | |
-Verbose | |
New-AzureRmResourceGroupDeployment -Name BackupRemediation ` | |
-ResourceGroupName $ResourceGroup ` | |
-TemplateUri 'https://raw.githubusercontent.com/krnese/AzureDeploy/master/AzureMgmt/Alerts/createOMSAlertWithBackupRemediation.json' ` | |
-workspaceName $WorkspaceName ` | |
-runbookName $RunbookName ` | |
-runbookWebhookUri $Webhook.WebhookURI ` | |
-Verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment