Resolved a description field parsing issue

Fixes some description fields not being imported
This commit is contained in:
Tiander Turpijn 2021-03-26 17:45:05 +01:00 коммит произвёл GitHub
Родитель 13edaf9fb3
Коммит ccf1abd9ef
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 14 добавлений и 11 удалений

Просмотреть файл

@ -84,19 +84,22 @@ if ($scheduledRulesExist -eq $true) {
foreach ($newScheduledRule in $newScheduledRules) {
$NewRuleObject = @{
DisplayName = $newScheduledRule.DisplayName
Query = $newScheduledRule.Query
QueryPeriod = $newScheduledRule.QueryPeriod.Ticks
QueryFrequency = $newScheduledRule.QueryFrequency.Ticks
TriggerThreshold = $newScheduledRule.TriggerThreshold
Severity = $newScheduledRule.Severity
DisplayName = $newScheduledRule.DisplayName
Query = $newScheduledRule.Query
QueryPeriod = $newScheduledRule.QueryPeriod.Ticks
QueryFrequency = $newScheduledRule.QueryFrequency.Ticks
TriggerThreshold = $newScheduledRule.TriggerThreshold
Severity = $newScheduledRule.Severity
SuppressionDuration = $newScheduledRule.SuppressionDuration.Ticks
SuppressionEnabled = $newScheduledRule.SuppressionEnabled
TriggerOperator = $newScheduledRule.TriggerOperator
Scheduled = $true
Enabled = $true
SuppressionEnabled = $newScheduledRule.SuppressionEnabled
TriggerOperator = $newScheduledRule.TriggerOperator
Scheduled = $true
Enabled = $newScheduledRule.Enabled
}
if ($newScheduledRule.Description -ne "") {
$NewRuleObject += @{Description = $newScheduledRule.Description}
}
if ($Description) { $NewRuleObject.Description = $Description } #only add Description to the object if it contains a value
#creating an array to store Tactics
[System.Collections.Generic.List[System.String]]$TacticObject = @()