Skip to content

Commit

Permalink
Modified precedence warnings
Browse files Browse the repository at this point in the history
Modified precedence warnings when existing policies were found so that they would only be displayed once
  • Loading branch information
bk-cs committed Oct 28, 2022
1 parent 9d3cb7e commit 8add6b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion PSFalcon.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ Command Changes
empty string values in order to prevent errors when creating and/or modifying Sensor Update policies.
* Modified 'Import-FalconConfig' to prevent an attempt to modify a policy when the policy was not successfully
created earlier in the import process.
created earlier in the import process. Also ensured that the precedence warnings when existing policies were
found would only be displayed once.
Resolved Issues
Expand Down
2 changes: 1 addition & 1 deletion Public/psf-config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ https://github.com/crowdstrike/psfalcon/wiki/Import-FalconConfig
if ($Config.Result | Where-Object { $_.action -ne 'Ignored' }) {
# Output warning for existing policy precedence
foreach ($Item in ($Config.Result | Where-Object { $_.action -eq 'Created' -and $_.type -match
'Policy$' } | Select-Object type,platform)) {
'Policy$' } | Select-Object type,platform -Unique)) {
if ($Config.($Item.type).Cid | Where-Object { $_.platform_name -eq $Item.platform -and $_.name -ne
'platform_default' }) {
$PSCmdlet.WriteWarning("[Import-FalconConfig] Existing $($Item.platform) $(
Expand Down

0 comments on commit 8add6b7

Please sign in to comment.