{"action":"created","comment":{"url":"https://api.github.com/repos/squaredup/Scripts/pulls/comments/95483623","pull_request_review_id":16039152,"id":95483623,"diff_hunk":"@@ -0,0 +1,500 @@\n+<#\n+.SYNOPSIS\n+    Creates SCOM notification channels with HTML formatting enabled.\n+.DESCRIPTION\n+    This script will create SCOM notification channels with HTML formatting options enabled. This allows for significantly richer notification templates.\n+\n+    Channels can either be created from scratch or clone their settings from an existing channel (and will therefore use it's predefined endpoints).\n+\n+    By default notification bodies will include appropriate links to the SCOM Web console, but by specifying the SquaredUpUrl parameter links will use Squared Up instead.\n+\n+    Please ensure that a management group connection exists prior to running the script - either run this from the Operations Manager shell or run New-SCOMManagementGroupConnection.\n+.PARAMETER SquaredUpURL\n+    The root URL of the Squared Up web console.  If a protocol is not specified, http:// will be prepended.  If this value is not specified, link will use the SCOM Web console instead.\n+.PARAMETER BaseSmtpChannel\n+    Specifies the Id or Displayname of an existing Notification Channel from which to clone settings.  You can get a list of IDs by running Get-SCOMNotificationChannel | select -ExpandProperty Action | fl DisplayName,Id\n+.PARAMETER SMTPServerFQDN\n+    The FQDN of the SMTP relay you want to send notification emails to.\n+.PARAMETER SMTPFromAddress\n+    The email address notification emails will be sent from, and the reply-to address.\n+.PARAMETER SMTPServerPort\n+    The port number your SMTP relay is listening on.  Defaults to 25 if unspecified.\n+.PARAMETER SMTPRetryMins\n+    The number of minutes between retries should the SMTP server not respond.\n+.PARAMETER SMTPAuthentication\n+    The authentication mechanism used by the SMTP relay.  Valid values are 'Anonymous' (the default if unspecified) or 'Ntlm'.\n+.PARAMETER HighImportance\n+    Controls whether channels are created with the High Importance mail flag.  Default value is false.\n+.PARAMETER PlainText\n+    Controls whether channels with a Plaintext format are created rather than HTML.  Default value is false.\n+.EXAMPLE\n+    C:\\PS> .\\New-SCOMHtmlNotificationChannel.ps1 -SquaredUpURL 'SQUP.contoso.com/SquaredUpv3' -SMTPServerFQDN \"mail.contoso.com\" -SMTPFromAddress \"SCOM@contoso.com\" -HighImportance\n+    Creates High Importance HTML channels in SCOM using the specified SMTP relay settings.\n+.EXAMPLE\n+    C:\\PS> .\\New-SCOMHtmlNotificationChannel.ps1 -SquaredUpURL \"SQUP.contoso.com/SquaredUpv3\" -BaseSmtpChannelGuid 2149e02e-6bb2-661a-1535-17d1dba162ab -PlainText\n+    Creates Plaintext channels with normal importance, taking all SMTP settings from an existing SMTP notification channel.\n+.INPUTS\n+    None\n+.OUTPUTS\n+    Microsoft.EnterpriseManagement.Administration.SmtpNotificationAction\n+.NOTES \n+    Copyright 2016 Squared Up Limited, All Rights Reserved.\n+.LINK\n+    https://www.squaredup.com\n+.LINK\n+    https://github.com/squaredup\n+#>\n+[CmdletBinding(\n+    SupportsShouldProcess=$true, \n+    DefaultParameterSetName=\"New\")]\n+Param(\n+    [Parameter(\n+        ParameterSetName = 'Clone',\n+        Mandatory = $false       \n+    )]\n+    [Parameter(\n+        ParameterSetName = 'New',\n+        Mandatory = $false\n+    )]\n+    [string]$SquaredUpURL,\n+\n+    [Parameter(\n+        ParameterSetName = 'Clone',\n+        Mandatory = $true\n+    )]\n+    [ValidateNotNullOrEmpty()]\n+    [string]$BaseSmtpChannel,\n+    \n+    [Parameter(\n+        ParameterSetName = 'New',\n+        Mandatory = $true\n+    )]\n+    [ValidateNotNullOrEmpty()]\n+    [string]$SMTPServerFQDN,\n+\n+    [Parameter(\n+        ParameterSetName = 'New',\n+        Mandatory = $true\n+    )]\n+    [ValidateNotNullOrEmpty()]\n+    [string]$SMTPFromAddress,\n+\n+    [Parameter(\n+        ParameterSetName = 'New',\n+        Mandatory = $false\n+    )]\n+    [ValidateRange(0,[int]::MaxValue)]\n+    [int]$SMTPServerPort = 25,\n+\n+    [Parameter(\n+        ParameterSetName = 'New',\n+        Mandatory = $false\n+    )]\n+    [ValidateRange(1,[int]::MaxValue)]\n+    [int]$SMTPRetryMins = 5,\n+\n+    [Parameter(\n+        ParameterSetName = 'New',\n+        Mandatory = $false\n+    )]\n+    [ValidateSet('Anonymous', 'Ntlm')]\n+    [string]$SMTPAuthentication = 'Anonymous',\n+    \n+    [Parameter(\n+        ParameterSetName = 'New',\n+        Mandatory = $false        \n+    )]\n+    [Parameter(\n+        ParameterSetName = 'Clone',\n+        Mandatory = $false        \n+    )]\n+    [Switch]$HighImportance,\n+    \n+    [Parameter(\n+        ParameterSetName = 'New',\n+        Mandatory = $false        \n+    )]\n+    [Parameter(\n+        ParameterSetName = 'Clone',\n+        Mandatory = $false        \n+    )]\n+    [Switch]$PlainText\n+)\n+\n+function Get-NotificationActionBody {\n+    [CmdletBinding()]\n+    [OutputType([String])]\n+    Param(\n+        [Switch]$Html,\n+        [string]$SquaredUpURL\n+    )\n+\n+    if ([string]::IsNullOrEmpty($SquaredUpURL)) {\n+        Write-Verbose -Message 'Links in the notification body will use the SCOM Web Console' -Verbose:$VerbosePreference\n+        $AlertUrl = '$Target/Property[Type=\"Notification!Microsoft.SystemCenter.AlertNotificationSubscriptionServer\"]/WebConsoleUrl$?DisplayMode=Pivot&AlertID=$UrlEncodeData/Context/DataItem/AlertId$'\n+        $ObjectUrl = '$Target/Property[Type=\"Notification!Microsoft.SystemCenter.AlertNotificationSubscriptionServer\"]/WebConsoleUrl$?DisplayMode=Pivot&ViewType=DiagramView&PmoID=$UrlEncodeData/Context/DataItem/ManagedEntity$'\n+    }\n+    else {\n+        Write-Verbose -Message \"Links in the notification body will use the Squared Up server '$SquaredUpURL'\" -Verbose:$VerbosePreference\n+        $AlertUrl = $SquaredUpURL + '/drilldown/scomalert?id=$UrlEncodeData/Context/DataItem/AlertId$'    \n+        $ObjectUrl = $SquaredUpURL + '/drilldown/scomobject?id=$UrlEncodeData/Context/DataItem/ManagedEntity$'\n+    }\n+    $Severity = '$Data/Context/DataItem/Severity$'\n+    $CreatedByMonitor = '$Data/Context/DataItem/CreatedByMonitor$'\n+    $ResolutionStateName = '$Data/Context/DataItem/ResolutionStateName$'\n+    $AlertName = '$Data/Context/DataItem/AlertName$'\n+    $AlertDescription = '$Data/Context/DataItem/AlertDescription$'\n+    $ManagedEntityDisplayName = '$Data/Context/DataItem/ManagedEntityDisplayName$'\n+    $ManagedEntityPath = '$Data/Context/DataItem/ManagedEntityPath$'\n+    $NotificationSubId = '$MPElement$'\n+\n+    if ($Html) \n+    {\n+        return [string]::Join(\"`n\", @(\n+            \"<!DOCTYPE html>\",\n+            \"<html><head>\",\n+            \"<!-- (c) Squared Up Ltd 2016 -->\",\n+            \"<style>div span{{display:none;text-decoration:line-through;}}.y{{display:inline;text-decoration:none;}}.s-$Severity{{display:inline;text-decoration:none;}}.m-$CreatedByMonitor{{display:inline;text-decoration:none;}}.t{{font-weight:bold;}}.b{{background:#f1f1f1;}}.b-2-New{{background:#FF3E3E;}}.b-1-New{{background:#FDC700;}}.b-0-New{{background:#5F9ECA;}}</style>\",\n+            \"</head>\",\n+            \"<body style='font-size:0.8em;font-family:arial;line-height:1.5em;color:#444444;'>\",\n+            \"<div>\",\n+            \"<div class='b'><div class='b-$Severity-$ResolutionStateName'>&nbsp;</div></div>\",\n+            \"<div class='t'><span class='y'>$ResolutionStateName | </span><span class='s-2'>Critical</span><span class='s-1'>Warning</span><span class='s-0'>Info</span> | <span class='m-true'>Monitor</span><span class='m-false'>Rule</span></div>\",\n+            \"<h2 style='margin-bottom:0;line-height:1em;'>$AlertName</h2>\",\n+            \"on<br />\",\n+            \"<b>$ManagedEntityDisplayName</b><br/>\",\n+            \"<b>$ManagedEntityPath</b><br/>\",\n+            \"<br />\",\n+            \"<i>$AlertDescription</i><br />\",\n+            \"<br/>\",\n+            \"<a href='$AlertUrl'>view alert</a> | <a href='$ObjectUrl'>view object</a><br />\",\n+            \"Notification Subscription ID: $NotificationSubId\",\n+            \"</div>\",\n+            \"</body>\",\n+            \"</html>\"            \n+        ))\n+    }\n+    else \n+    {\n+        return [string]::Join(\"`n\", @(\n+            \"$ResolutionStateName | Severity:$Severity | Monitor:$CreatedByMonitor\",\n+            \"\",\n+            \"$AlertName\",\n+            \"on:\",\n+            \"$ManagedEntityDisplayName\",\n+            \"$ManagedEntityPath\",\n+            \"\",\n+            \"$AlertDescription\",\n+            \"\",\n+            \"View alert:\",\n+            \"$AlertUrl\",\n+            \"\",\n+            \"View object:\",\n+            \"$ObjectUrl\",\n+            \"\",\n+            \"Notification Subscription ID:\",\n+            \"$NotificationSubId\"\n+        ))\n+    }\n+}\n+\n+function Get-NotificationActionDisplayName {\n+    [CmdletBinding()]\n+    [OutputType([String])]\n+    Param(\n+        [Switch]$Html,\n+        [Switch]$HighImportance,\n+        [Switch]$SquaredUp\n+    )\n+\n+    $emailFormat = \"Plain text\"\n+    $importance = \"Normal importance\"\n+    $console = \"SCOM Web Console\"\n+\n+    if ($Html) {\n+        $emailFormat = \"HTML\"\n+    }\n+\n+    if ($HighImportance) {\n+        $importance = \"High importance\"\n+    }\n+\n+    if ($SquaredUp) {\n+        $console = \"Squared Up Console\"\n+    }\n+\n+    return \"$emailFormat Notifications - $console - $importance\"\n+}\n+\n+function Get-NotificationActionSubject {\n+    [CmdletBinding()]\n+    [OutputType([String])]\n+    Param()\n+    return 'Alert ($Data/Context/DataItem/ResolutionStateName$): $Data/Context/DataItem/AlertName$'\n+}\n+\n+function Get-NotificationActionDescription {\n+    [CmdletBinding()]\n+    [OutputType([String])]\n+    Param(\n+        [Parameter(Mandatory = $false)]\n+        [string]$BaseDisplayName\n+    )\n+    if ($PSBoundParameters.ContainsKey('BaseDisplayName')) {\n+        return \"This is a modified copy of the '$BaseDisplayName' channel.  Any changes to the connection details of the original channel will be used automatically by this channel.\"\n+    } else {\n+        return \"Created on $([Datetime]::Now) by $(Get-SCOMConnectedUser)\"\n+    }\n+}\n+\n+function New-SmtpChannel {\n+    [CmdletBinding(SupportsShouldProcess=$true)]\n+    Param(\n+        [string]$SquaredUpURL,\n+        $ChannelSettings,        \n+        [switch]$PlainText,\n+        [switch]$HighImportance\n+    )\n+\n+    $action = New-Object -typename 'Microsoft.EnterpriseManagement.Administration.SmtpNotificationAction' -ArgumentList \"SMTPHTMLNotificationChannel$([guid]::NewGuid().Guid.replace('-','_'))\"\n+\n+    #Configure\n+    $action.Subject = Get-NotificationActionSubject\n+    $action.Body = Get-NotificationActionBody -Html:(!$PlainText) -SquaredUpURL $SquaredUpURL\n+    $action.Description = $ChannelSettings.Description\n+    $action.DisplayName = Get-NotificationActionDisplayName -Html:(!$PlainText) -HighImportance:$HighImportance -SquaredUp:(![string]::IsNullOrEmpty($SquaredUpURL))\n+    $action.BodyEncoding = $ChannelSettings.BodyEncoding;\n+    $action.Endpoint = $ChannelSettings.Endpoint;\n+    $action.From = $ChannelSettings.From;\n+    $action.IsBodyHtml = !$PlainText;\n+    $action.ReplyTo = $ChannelSettings.ReplyTo;\n+    $action.SubjectEncoding = $ChannelSettings.SubjectEncoding;\n+\n+    if ($HighImportance) {\n+        $action.Headers.Add((New-Object -Typename Microsoft.EnterpriseManagement.Administration.SmtpNotificationActionHeader -ArgumentList \"Importance\", \"High\"))\n+        $action.Headers.Add((New-Object -Typename Microsoft.EnterpriseManagement.Administration.SmtpNotificationActionHeader -ArgumentList \"X-Priority\", \"1\" ))\n+        $action.Headers.Add((New-Object -Typename Microsoft.EnterpriseManagement.Administration.SmtpNotificationActionHeader -ArgumentList \"X-MSMail-Priority\", \"High\" ))\n+    }\n+\n+    #Save\n+    if ($null -eq $ChannelSettings.EndPoint.Id -and $pscmdlet.ShouldProcess(\"$($ChannelSettings.EndPoint.PrimaryServer.Address) on port $($ChannelSettings.EndPoint.PrimaryServer.PortNumber) using $($ChannelSettings.EndPoint.PrimaryServer.AuthenticationType) authentication\",\"Create SMTP Endpoint\"))\n+    {\n+        Write-Verbose -Message \"Creating SMTP Endpoint '$($ChannelSettings.EndPoint.PrimaryServer.Address)' on port $($ChannelSettings.EndPoint.PrimaryServer.PortNumber) using $($ChannelSettings.EndPoint.PrimaryServer.AuthenticationType) authentication\" -Verbose:$VerbosePreference\n+        Save-SCOMNotificationEndpoint -NotificationEndpoint $ChannelSettings.EndPoint\n+    }  \n+\n+    if ($pscmdlet.ShouldProcess($action.DisplayName,\"Create SMTP Notification channel\"))\n+    {\n+        Write-Verbose -Message \"Creating SMTP notification channel '$($action.DisplayName)'\" -Verbose:$VerbosePreference\n+        Save-SCOMNotificationAction -NotificationAction $action\n+        return $action\n+    }    \n+}\n+\n+function New-SmtpEndpoint {\n+    [Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSUseShouldProcessForStateChangingFunctions\", \"\")]\n+    [CmdletBinding()]\n+    [OutputType([Microsoft.EnterpriseManagement.Administration.SmtpNotificationEndpoint])]\n+    Param(\n+        [string]$Name,\n+        [int]$SMTPRetryMins,\n+        [string]$SMTPServerFQDN,\n+        [int]$SMTPServerPort,\n+        [string]$SMTPAuthentication,\n+        [string]$Description\n+    )\n+\n+    $primaryServer = New-Object -TypeName 'Microsoft.EnterpriseManagement.Administration.SmtpServer' -ArgumentList $SMTPServerFQDN\n+    $primaryServer.AuthenticationType = $SMTPAuthentication\n+    $primaryServer.PortNumber = $SMTPServerPort\n+\n+    $endpoint = New-Object -TypeName 'Microsoft.EnterpriseManagement.Administration.SmtpNotificationEndpoint' -ArgumentList \"SMTPEndpoint$([guid]::NewGuid().Guid.replace('-','_'))\",'Smtp',$primaryServer\n+    $endpoint.PrimaryServerSwitchBackIntervalSeconds = $SMTPRetryMins * 60\n+    $endpoint.DisplayName = \"SMTPEndpoint for $Name\"\n+    $endpoint.Description = $Description\n+\n+    return $endpoint\n+}\n+\n+function Convert-SquaredUpUrl {\n+    [CmdletBinding()]\n+    [OutputType([string])]\n+    Param(\n+        [string]$Url\n+    )\n+\n+    $Url  = $Url.TrimEnd('/')","path":"New-SCOMHtmlNotificationChannel.ps1","position":326,"original_position":326,"commit_id":"514f65b2ba0a97450ad44c252dd93d7c7335b13c","original_commit_id":"514f65b2ba0a97450ad44c252dd93d7c7335b13c","user":{"login":"clarkd","id":3793131,"avatar_url":"https://avatars.githubusercontent.com/u/3793131?v=3","gravatar_id":"","url":"https://api.github.com/users/clarkd","html_url":"https://github.com/clarkd","followers_url":"https://api.github.com/users/clarkd/followers","following_url":"https://api.github.com/users/clarkd/following{/other_user}","gists_url":"https://api.github.com/users/clarkd/gists{/gist_id}","starred_url":"https://api.github.com/users/clarkd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clarkd/subscriptions","organizations_url":"https://api.github.com/users/clarkd/orgs","repos_url":"https://api.github.com/users/clarkd/repos","events_url":"https://api.github.com/users/clarkd/events{/privacy}","received_events_url":"https://api.github.com/users/clarkd/received_events","type":"User","site_admin":false},"body":"Ah just seen this - ignore the above :)","created_at":"2017-01-10T23:42:29Z","updated_at":"2017-01-10T23:43:58Z","html_url":"https://github.com/squaredup/Scripts/pull/1#discussion_r95483623","pull_request_url":"https://api.github.com/repos/squaredup/Scripts/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/squaredup/Scripts/pulls/comments/95483623"},"html":{"href":"https://github.com/squaredup/Scripts/pull/1#discussion_r95483623"},"pull_request":{"href":"https://api.github.com/repos/squaredup/Scripts/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/squaredup/Scripts/pulls/1","id":100719354,"html_url":"https://github.com/squaredup/Scripts/pull/1","diff_url":"https://github.com/squaredup/Scripts/pull/1.diff","patch_url":"https://github.com/squaredup/Scripts/pull/1.patch","issue_url":"https://api.github.com/repos/squaredup/Scripts/issues/1","number":1,"state":"open","locked":false,"title":"Enable HTML formatted notifications outside of product (migration from v2)","user":{"login":"shadeon","id":19157057,"avatar_url":"https://avatars.githubusercontent.com/u/19157057?v=3","gravatar_id":"","url":"https://api.github.com/users/shadeon","html_url":"https://github.com/shadeon","followers_url":"https://api.github.com/users/shadeon/followers","following_url":"https://api.github.com/users/shadeon/following{/other_user}","gists_url":"https://api.github.com/users/shadeon/gists{/gist_id}","starred_url":"https://api.github.com/users/shadeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadeon/subscriptions","organizations_url":"https://api.github.com/users/shadeon/orgs","repos_url":"https://api.github.com/users/shadeon/repos","events_url":"https://api.github.com/users/shadeon/events{/privacy}","received_events_url":"https://api.github.com/users/shadeon/received_events","type":"User","site_admin":false},"body":"This PR enables the ability to setup notification channels in SCOM with HTML formatting enabled, and optionally SMTP flags for importance set, without having to use Squared Up.\r\n\r\nAs such, this has been generalized to allow the SCOM web console URL to be injected as well, and no longer requires explicit cloning of an existing channel (you can create one using the script).\r\n\r\nIncluded (though not specific to this script) is a Pester file for ensuring scripts meet an appropriate level of quality.  If you are on Win 10 you already have the pester module and PSScriptAnalyser modules installed, but i'd recommend updating both modules first prior to invoking the tests.","created_at":"2017-01-09T16:49:44Z","updated_at":"2017-01-10T23:43:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a068ea6be98647b3296b83a9865020d9f1ae19c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/squaredup/Scripts/pulls/1/commits","review_comments_url":"https://api.github.com/repos/squaredup/Scripts/pulls/1/comments","review_comment_url":"https://api.github.com/repos/squaredup/Scripts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/squaredup/Scripts/issues/1/comments","statuses_url":"https://api.github.com/repos/squaredup/Scripts/statuses/514f65b2ba0a97450ad44c252dd93d7c7335b13c","head":{"label":"squaredup:work/ml/HtmlNotificationScript","ref":"work/ml/HtmlNotificationScript","sha":"514f65b2ba0a97450ad44c252dd93d7c7335b13c","user":{"login":"squaredup","id":11756852,"avatar_url":"https://avatars.githubusercontent.com/u/11756852?v=3","gravatar_id":"","url":"https://api.github.com/users/squaredup","html_url":"https://github.com/squaredup","followers_url":"https://api.github.com/users/squaredup/followers","following_url":"https://api.github.com/users/squaredup/following{/other_user}","gists_url":"https://api.github.com/users/squaredup/gists{/gist_id}","starred_url":"https://api.github.com/users/squaredup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squaredup/subscriptions","organizations_url":"https://api.github.com/users/squaredup/orgs","repos_url":"https://api.github.com/users/squaredup/repos","events_url":"https://api.github.com/users/squaredup/events{/privacy}","received_events_url":"https://api.github.com/users/squaredup/received_events","type":"Organization","site_admin":false},"repo":{"id":78129959,"name":"Scripts","full_name":"squaredup/Scripts","owner":{"login":"squaredup","id":11756852,"avatar_url":"https://avatars.githubusercontent.com/u/11756852?v=3","gravatar_id":"","url":"https://api.github.com/users/squaredup","html_url":"https://github.com/squaredup","followers_url":"https://api.github.com/users/squaredup/followers","following_url":"https://api.github.com/users/squaredup/following{/other_user}","gists_url":"https://api.github.com/users/squaredup/gists{/gist_id}","starred_url":"https://api.github.com/users/squaredup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squaredup/subscriptions","organizations_url":"https://api.github.com/users/squaredup/orgs","repos_url":"https://api.github.com/users/squaredup/repos","events_url":"https://api.github.com/users/squaredup/events{/privacy}","received_events_url":"https://api.github.com/users/squaredup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/squaredup/Scripts","description":"Contains various scripts related to SCOM and/or Squared Up","fork":false,"url":"https://api.github.com/repos/squaredup/Scripts","forks_url":"https://api.github.com/repos/squaredup/Scripts/forks","keys_url":"https://api.github.com/repos/squaredup/Scripts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squaredup/Scripts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squaredup/Scripts/teams","hooks_url":"https://api.github.com/repos/squaredup/Scripts/hooks","issue_events_url":"https://api.github.com/repos/squaredup/Scripts/issues/events{/number}","events_url":"https://api.github.com/repos/squaredup/Scripts/events","assignees_url":"https://api.github.com/repos/squaredup/Scripts/assignees{/user}","branches_url":"https://api.github.com/repos/squaredup/Scripts/branches{/branch}","tags_url":"https://api.github.com/repos/squaredup/Scripts/tags","blobs_url":"https://api.github.com/repos/squaredup/Scripts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squaredup/Scripts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squaredup/Scripts/git/refs{/sha}","trees_url":"https://api.github.com/repos/squaredup/Scripts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squaredup/Scripts/statuses/{sha}","languages_url":"https://api.github.com/repos/squaredup/Scripts/languages","stargazers_url":"https://api.github.com/repos/squaredup/Scripts/stargazers","contributors_url":"https://api.github.com/repos/squaredup/Scripts/contributors","subscribers_url":"https://api.github.com/repos/squaredup/Scripts/subscribers","subscription_url":"https://api.github.com/repos/squaredup/Scripts/subscription","commits_url":"https://api.github.com/repos/squaredup/Scripts/commits{/sha}","git_commits_url":"https://api.github.com/repos/squaredup/Scripts/git/commits{/sha}","comments_url":"https://api.github.com/repos/squaredup/Scripts/comments{/number}","issue_comment_url":"https://api.github.com/repos/squaredup/Scripts/issues/comments{/number}","contents_url":"https://api.github.com/repos/squaredup/Scripts/contents/{+path}","compare_url":"https://api.github.com/repos/squaredup/Scripts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squaredup/Scripts/merges","archive_url":"https://api.github.com/repos/squaredup/Scripts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squaredup/Scripts/downloads","issues_url":"https://api.github.com/repos/squaredup/Scripts/issues{/number}","pulls_url":"https://api.github.com/repos/squaredup/Scripts/pulls{/number}","milestones_url":"https://api.github.com/repos/squaredup/Scripts/milestones{/number}","notifications_url":"https://api.github.com/repos/squaredup/Scripts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squaredup/Scripts/labels{/name}","releases_url":"https://api.github.com/repos/squaredup/Scripts/releases{/id}","deployments_url":"https://api.github.com/repos/squaredup/Scripts/deployments","created_at":"2017-01-05T16:37:56Z","updated_at":"2017-01-05T16:37:56Z","pushed_at":"2017-01-10T11:09:08Z","git_url":"git://github.com/squaredup/Scripts.git","ssh_url":"git@github.com:squaredup/Scripts.git","clone_url":"https://github.com/squaredup/Scripts.git","svn_url":"https://github.com/squaredup/Scripts","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"squaredup:Develop","ref":"Develop","sha":"f2b3bd436e13c9e643146f3479a3b3dc91239c23","user":{"login":"squaredup","id":11756852,"avatar_url":"https://avatars.githubusercontent.com/u/11756852?v=3","gravatar_id":"","url":"https://api.github.com/users/squaredup","html_url":"https://github.com/squaredup","followers_url":"https://api.github.com/users/squaredup/followers","following_url":"https://api.github.com/users/squaredup/following{/other_user}","gists_url":"https://api.github.com/users/squaredup/gists{/gist_id}","starred_url":"https://api.github.com/users/squaredup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squaredup/subscriptions","organizations_url":"https://api.github.com/users/squaredup/orgs","repos_url":"https://api.github.com/users/squaredup/repos","events_url":"https://api.github.com/users/squaredup/events{/privacy}","received_events_url":"https://api.github.com/users/squaredup/received_events","type":"Organization","site_admin":false},"repo":{"id":78129959,"name":"Scripts","full_name":"squaredup/Scripts","owner":{"login":"squaredup","id":11756852,"avatar_url":"https://avatars.githubusercontent.com/u/11756852?v=3","gravatar_id":"","url":"https://api.github.com/users/squaredup","html_url":"https://github.com/squaredup","followers_url":"https://api.github.com/users/squaredup/followers","following_url":"https://api.github.com/users/squaredup/following{/other_user}","gists_url":"https://api.github.com/users/squaredup/gists{/gist_id}","starred_url":"https://api.github.com/users/squaredup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squaredup/subscriptions","organizations_url":"https://api.github.com/users/squaredup/orgs","repos_url":"https://api.github.com/users/squaredup/repos","events_url":"https://api.github.com/users/squaredup/events{/privacy}","received_events_url":"https://api.github.com/users/squaredup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/squaredup/Scripts","description":"Contains various scripts related to SCOM and/or Squared Up","fork":false,"url":"https://api.github.com/repos/squaredup/Scripts","forks_url":"https://api.github.com/repos/squaredup/Scripts/forks","keys_url":"https://api.github.com/repos/squaredup/Scripts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squaredup/Scripts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squaredup/Scripts/teams","hooks_url":"https://api.github.com/repos/squaredup/Scripts/hooks","issue_events_url":"https://api.github.com/repos/squaredup/Scripts/issues/events{/number}","events_url":"https://api.github.com/repos/squaredup/Scripts/events","assignees_url":"https://api.github.com/repos/squaredup/Scripts/assignees{/user}","branches_url":"https://api.github.com/repos/squaredup/Scripts/branches{/branch}","tags_url":"https://api.github.com/repos/squaredup/Scripts/tags","blobs_url":"https://api.github.com/repos/squaredup/Scripts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squaredup/Scripts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squaredup/Scripts/git/refs{/sha}","trees_url":"https://api.github.com/repos/squaredup/Scripts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squaredup/Scripts/statuses/{sha}","languages_url":"https://api.github.com/repos/squaredup/Scripts/languages","stargazers_url":"https://api.github.com/repos/squaredup/Scripts/stargazers","contributors_url":"https://api.github.com/repos/squaredup/Scripts/contributors","subscribers_url":"https://api.github.com/repos/squaredup/Scripts/subscribers","subscription_url":"https://api.github.com/repos/squaredup/Scripts/subscription","commits_url":"https://api.github.com/repos/squaredup/Scripts/commits{/sha}","git_commits_url":"https://api.github.com/repos/squaredup/Scripts/git/commits{/sha}","comments_url":"https://api.github.com/repos/squaredup/Scripts/comments{/number}","issue_comment_url":"https://api.github.com/repos/squaredup/Scripts/issues/comments{/number}","contents_url":"https://api.github.com/repos/squaredup/Scripts/contents/{+path}","compare_url":"https://api.github.com/repos/squaredup/Scripts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squaredup/Scripts/merges","archive_url":"https://api.github.com/repos/squaredup/Scripts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squaredup/Scripts/downloads","issues_url":"https://api.github.com/repos/squaredup/Scripts/issues{/number}","pulls_url":"https://api.github.com/repos/squaredup/Scripts/pulls{/number}","milestones_url":"https://api.github.com/repos/squaredup/Scripts/milestones{/number}","notifications_url":"https://api.github.com/repos/squaredup/Scripts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squaredup/Scripts/labels{/name}","releases_url":"https://api.github.com/repos/squaredup/Scripts/releases{/id}","deployments_url":"https://api.github.com/repos/squaredup/Scripts/deployments","created_at":"2017-01-05T16:37:56Z","updated_at":"2017-01-05T16:37:56Z","pushed_at":"2017-01-10T11:09:08Z","git_url":"git://github.com/squaredup/Scripts.git","ssh_url":"git@github.com:squaredup/Scripts.git","clone_url":"https://github.com/squaredup/Scripts.git","svn_url":"https://github.com/squaredup/Scripts","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/squaredup/Scripts/pulls/1"},"html":{"href":"https://github.com/squaredup/Scripts/pull/1"},"issue":{"href":"https://api.github.com/repos/squaredup/Scripts/issues/1"},"comments":{"href":"https://api.github.com/repos/squaredup/Scripts/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/squaredup/Scripts/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/squaredup/Scripts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/squaredup/Scripts/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/squaredup/Scripts/statuses/514f65b2ba0a97450ad44c252dd93d7c7335b13c"}}}}
{"actor":{"display_login":"clarkd"}}