Skip to content

Instantly share code, notes, and snippets.

View dcherry88's full-sized avatar

Danny Cherry dcherry88

View GitHub Profile
@dcherry88
dcherry88 / gist:36ae773b4015dd4cd83b89eec5fd61bd
Created September 23, 2021 16:07
UniversalAutomation job error logs
2021-09-23T10:52:58.0404141-05:00 0HMBUL7JFVG6T:000000C1 [INF] Request finished HTTP/2 GET https://SITE.DOMAIN.COM/api/v1/script/Server Decommission Main.ps1/job - - - 200 - application/json;+charset=utf-8 104.7096ms (791a596a)
2021-09-23T10:52:58.1087017-05:00 [DBG] Agent Output: (06fd9dc3)
2021-09-23T10:52:58.2947301-05:00 0HMBUL7JFVG6T:000000C3 [INF] Executing HttpStatusCodeResult, setting HTTP status code 200 (e28ccfae)
2021-09-23T10:52:58.2948722-05:00 0HMBUL7JFVG6T:000000C3 [INF] Executed action "UniversalDashboard.Controllers.SessionController.Index (Universal.Server)" in 278.0746ms (afa2e885)
2021-09-23T10:52:58.2949129-05:00 0HMBUL7JFVG6T:000000C3 [INF] Executed endpoint '"UniversalDashboard.Controllers.SessionController.Index (Universal.Server)"' (99874f2b)
2021-09-23T10:52:58.2951007-05:00 0HMBUL7JFVG6T:000000C3 [INF] Request finished HTTP/2 GET https://SITE.DOMAIN.COM/api/internal/session/37bd5291-f19d-4dc9-9a52-2701f027fa05 - - - 200 0 - 281.7424ms (791a596a)
2021-09-23T10:52:58.4299513-05:00 0
@dcherry88
dcherry88 / gist:3f780c75c04faf93e5ec47b31e53e220
Created February 10, 2021 20:42
PowerShell function that will create and write custom event to windows eventlog area.
Slightly modified function from: https://www.powershellbros.com/create-new-event-log-powershell-function/
function New-CustomEvent {
[CmdletBinding()]
# Parameters used in this function
param
(
[Parameter(Mandatory = $false, HelpMessage="Provide eventlog name", ValueFromPipeline = $false)] $EventLog,
[Parameter(Mandatory = $false, HelpMessage="Provide event source", ValueFromPipeline = $false)] $Source,