Resolved a description field parsing issue
Fixes some description fields not being imported
This commit is contained in:
Родитель
13edaf9fb3
Коммит
ccf1abd9ef
|
@ -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 = @()
|
||||
|
|
Загрузка…
Ссылка в новой задаче