From 76f0028db561397fecc4c28fe05c8b660e7d87cd Mon Sep 17 00:00:00 2001 From: Naveen Angali Date: Mon, 18 Nov 2024 10:10:41 -0500 Subject: [PATCH] Update forensics_log_pull.ps1 --- Azure-ARM/forensics_log_pull.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Azure-ARM/forensics_log_pull.ps1 b/Azure-ARM/forensics_log_pull.ps1 index fb6cc65..69aef93 100644 --- a/Azure-ARM/forensics_log_pull.ps1 +++ b/Azure-ARM/forensics_log_pull.ps1 @@ -40,11 +40,11 @@ while ($SqlDataReader.Read()) { Message = $SqlDataReader["Message"] Level = $SqlDataReader["Level"] TimeStamp = $SqlDataReader["TimeStamp"] - Exception = if ($SqlDataReader["Exception"] -ne $null) { $SqlDataReader["Exception"] } else { "NULL" } + Exception = $SqlDataReader["Exception"] LogEvent = $SqlDataReader["LogEvent"] AssemblyName = $SqlDataReader["AssemblyName"] AssemblyVersion = $SqlDataReader["AssemblyVersion"] - SourceContext = if ($SqlDataReader["LogEvent"] -ne $null) { $SqlDataReader["SourceContext"].ToString() } else { "NULL" } + SourceContext = $SqlDataReader["SourceContext"] EnvironmentUserName = $SqlDataReader["EnvironmentUserName"] MachineName = $SqlDataReader["MachineName"] }