Skip to content

Exporting detections with SensorGroupingTags #265

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

You must be logged in to vote

Not in a single command, but a simple script will do it:

$DetectionList = @(Get-FalconDetection -Filter "created_timestamp:>'now-30d'" -Detailed -All |
Select-Object detection_id,max_severity_displayname,status,device).foreach{
    # Get list of detections and convert 'device' from object to 'device_id' string
    $_.device = $_.device.device_id
    $_
}
if ($DetectionList) {
    foreach ($Device in (Get-FalconHost -Id $DetectionList.device | Select-Object device_id,tags)) {
        @($DetectionList).Where({ $_.device -eq $Device.device_id }).foreach{
            # Get device info using 'device_id' in detections, and append 'tags' as a string joined by commas
            $_.PSObject.Prope…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant