Skip to content

iricigor/KQL

Repository files navigation

KQL

PowerShell module that enables running KQL (Kusto Query Language) queries directly from PowerShell

latest version downloads platforms

Usage

Install-Module -Name KQL -Scope CurrentUser
Invoke-KQL 'StormEvents | take 2'

Links

Known issues

  • Due to nuget compatibility issues, the module is running only on Windows PowerShell at the moment
  • For the same reasons, it supports only implicit authentication (i.e. on user behalf)

Examples

# Use Verbose flag
Invoke-KQL 'StormEvents | project StartTime, State, EventNarrative | take 5' -Verbose

# Use alternate database
Invoke-KQL -Database 'https://help.kusto.windows.net/SampleLogs' -Query 'RawSysLogs | summarize count() by name'

# Use Invoke-KQL inside standard PowerShell pipeline
'StormEvents', 'Covid19_Bing' | % {Invoke-KQL "$_ | count"}

# Use multiple queries in one command
'StormEvents', 'Covid19_Bing' | % {"$_ | count"} | Invoke-KQL

# Run Kusto commands
Invoke-KQL '.show tables'

Testing pipeline

Build Status

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published