-
we have 1000K detects which are older than 30days Im trying to get the All detect ids older than 30 days and closing them but im able to delete only 5000 could you please help me on this Below is my code
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In your example, you're using PSFalcon v1 commands ( In PSFalcon v1, each command would only return a maximum of 5,000 per request, which is what you're doing with this line:
You'll need to add the Here's an example where I loop through large numbers of detections 1,000 results at a time to hide any detection involving a specific filename. Note that hidden detections are unable to be recovered via API, so be very careful if you choose to hide them: https://github.com/CrowdStrike/psfalcon/wiki/Basic-Scripts#find-and-hide-large-numbers-of-detections You could potentially modify this script to check for detections that have |
Beta Was this translation helpful? Give feedback.
In your example, you're using PSFalcon v1 commands (
Get-CsDetectId
). I recommend updating to v2 and using the equivalent commandGet-FalconDetection
. You're also exporting to CSV and re-importing the CSV when you don't really need to.In PSFalcon v1, each command would only return a maximum of 5,000 per request, which is what you're doing with this line:
You'll need to add the
-All
parameter to loop through the detections, but keep in mind that the Detections API only returns at maximum of 10,000 results at any one time. If you want to go through more than 10,000 detections, you're going to have to refine your …