psfalcon icon indicating copy to clipboard operation
psfalcon copied to clipboard

[ BUG ] `Import-FalconConfig` generates `Cannot overwrite variable` error

Open bk-cs opened this issue 1 year ago • 1 comments

Describe the bug Import-FalconConfig generates an Cannot overwrite variable because the variable has been optimized when comparing IoaRule items against existing custom IOA rules in the target CID

To Reproduce Use Import-FalconConfig to import IoaGroup

Environment (please complete the following information):

  • OS: Windows 11
  • PowerShell: 5.1
  • PSFalcon: 2.2.8

bk-cs avatar Jan 13 '25 20:01 bk-cs

Changes to Import-FalconConfig that resolve this issue will be included in the next release. If you'd like to resolve it for your local module before release, you can replace public\psf-config.ps1 using the steps outlined below.

Import-Module -Name PSFalcon
$ModulePath = (Show-FalconModule).ModulePath
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/CrowdStrike/psfalcon/refs/heads/dev/public/psf-config.ps1 -UseBasicParsing).Content > (Join-Path (Join-Path $ModulePath public) psf-config.ps1)

Please ensure that you close and re-open PowerShell and re-import PSFalcon before testing.

bk-cs avatar Jan 13 '25 20:01 bk-cs

This fix was included in the 2.2.9 release. Closing issue now that the release is available.

bk-cs avatar Sep 13 '25 01:09 bk-cs