-
Notifications
You must be signed in to change notification settings - Fork 81
Filtering Results
Many PSFalcon commands support the use of Falcon Query Language ("FQL") statements using the -Filter parameter. When using -Filter, it is important to keep in mind:
- Available FQL filters and their syntax will vary between APIs and are not determined by PSFalcon
- Each FQL filter and value may be case-sensitive (exact case, lowercase only, etc.)
- Each FQL filter statement can contain a maximum of 20 properties
Values in an FQL statement tend to either be restricted to $true, $false, an integer or a string (description, date or time, etc).
The simplest FQL statements require a single condition and value. For instance, to find the host identifier for a device with the hostname ONE, use the following filter:
Get-FalconHost -Filter "hostname:'ONE'"Many filters will automatically return partial matches, but you can include wildcards (*):
Get-FalconHost -Filter "hostname:*'*ONE*'"Using square brackets will restrict results to exact matches (including case):
Get-FalconHost -Filter "hostname:['ONE']"Additional conditions and values can be added using the proper operator. The following filter example will retrieve the host identifier for a device that has a hostname of ONE and is running Windows:
Get-FalconHost -Filter "hostname:'ONE'+platform_name:'Windows'"To find host identifiers for devices that are named ONE or TWO:
Get-FalconHost -Filter "hostname:'ONE',hostname:'TWO'"Multiple conditions can be used to retrieve more complex results. The following filter lists host identifiers for devices that are named ONE and are running Windows or are not named TWO and have been seen online within the last two days:
Get-FalconHost -Filter "(hostname:'ONE'+platform_name:'Windows'),(hostname:!'TWO'+last_seen:>'Last 2 days')"NOTE: 'Last 2 days' is not a valid FQL value when submitted via API. PSFalcon looks for a relative date string like last <integer> hour(s)/day(s) and automatically converts it into an RFC3339 (UTC) date string. For example, at exactly 14:00 hours (Pacific Standard Time) on November 10, 2020 if you attempted to use Get-FalconHost with the following filter, PSFalcon will convert your filter to the following value (seen through the Write-Verbose output).
PS>Get-FalconHost -Filter "last_seen:>'Last 2 days'"
VERBOSE: [ApiClient.Invoke] ... ?filter=last_seen:>'2020-11-10T22:00:00Z'
- Using PSFalcon
-
Commands by Permission
- Actors (Falcon Intelligence)
- Alerts
- API integrations
- App Logs
- Assets
- CAO Hunting
- Case Templates
- Cases
- Channel File Control Settings
- Cloud Security API Assets
- Configuration Assessment
- Content Update Policies
- Correlation Rules
- CSPM registration
- Custom IOA rules
- Device Content
- Device control policies
- Event streams
- Falcon Complete Dashboards
- Falcon Container Image
- Falcon Data Replicator
- Falcon FileVantage
- Falcon FileVantage Content
- Firewall management
- Flight Control
- Host groups
- Host Migration
- Hosts
- Identity Protection Entities
- Identity Protection GraphQL
- Identity Protection Policy Rules
- Incidents
- Indicators (Falcon Intelligence)
- Installation tokens
- Installation token settings
- IOA Exclusions
- IOC Manager APIs
- IOCs
- IT Automation - Policies
- IT Automation - Task Executions
- IT Automation - Tasks
- IT Automation - User Groups
- Kubernetes Protection
- Machine Learning exclusions
- MalQuery
- Malware Families (Falcon Intelligence)
- Message Center
- Mobile Enrollment
- Monitoring rules (Falcon Intelligence Recon)
- NGSIEM
- NGSIEM Dashboards
- NGSIEM Lookup Files
- NGSIEM Parsers
- NGSIEM Saved Queries
- On demand scans (ODS)
- OverWatch Dashboard
- Prevention Policies
- Quarantined Files
- QuickScan Pro
- Real time response
- Real time response (admin)
- Reports (Falcon Intelligence)
- Response policies
- Rules (Falcon Intelligence)
- Sample uploads
- Sandbox (Falcon Intelligence)
- Scheduled Reports
- Sensor Download
- Sensor update policies
- Sensor Usage
- Sensor Visibility Exclusions
- Snapshot
- Snapshot Scanner Image Download
- Tailored Intelligence
- Threatgraph
- User management
- Vulnerabilities
- Vulnerabilities (Falcon Intelligence)
- Workflow
- Zero Trust Assessment
- Other Commands
- Examples
-
CrowdStrike SDKs
- FalconPy - Python 3
- goFalcon - Go
- Rusty Falcon - Rust