Skip to content

Im trying to close all the detects which are older than 30 days #98

Answered by bk-cs
kumar4755 asked this question in Q&A
Discussion options

You must be logged in to vote

In your example, you're using PSFalcon v1 commands (Get-CsDetectId). I recommend updating to v2 and using the equivalent command Get-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:

$Detectid = (Get-CsDetectId -Filter "first_behavior:<'2021-04-05'").resources

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 …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bk-cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #47 on September 24, 2021 15:23.