Closed hmscott4 closed 3 years ago
@hmscott4, are you talking about changing this:
$searchStrings = @(
"//config/exceptions/exception[AlertName='$alertName' and @enabled='true']"
"//config/rules/rule[managementPackName='$mpName' and @enabled='true']"
)
to this? (two single quotes)
$searchStrings = @(
"//config/exceptions/exception[AlertName=''$alertName'' and @enabled='true']"
"//config/rules/rule[managementPackName=''$mpName'' and @enabled='true']"
)
When the Name of an alert contains a single quote ('), the Assign-Alert script fails. Resolve by double-quoting Alert Name variable in PS.