external help file | Module Name | online version | schema |
---|---|---|---|
PowerShellKusto.dll-Help.xml |
PowerShellKusto |
2.0.0 |
Invokes management commands over an Azure Data Explorer Cluster.
Invoke-KustoControlCommand
[-Command] <String>
[[-Database] <String>]
[-OutputType <OutputType>]
[-RequestProperties <ClientRequestProperties>]
[<CommonParameters>]
The Invoke-KustoControlCommand
cmdlet allows you to invoke management commands also known as control commands over an Azure Data Explorer Cluster. For detailed information on this topic check out Management commands overview.
Invoke-KustoControlCommand '.create table MyLogs(
Level:string,
Timestamp:datetime,
UserId:string,
TraceId:string,
Message:string,
ProcessId:int32)'
This example shows how to create a new Table on a database specified by Connect-Kusto
.
Invoke-KustoControlCommand -Database myDb '.show tables details
| where TotalRowCount > 0
| extend TotalExtentSize = format_bytes(TotalExtentSize)
| extend TotalOriginalSize = format_bytes(TotalOriginalSize)
| extend HotExtentSize = format_bytes(HotExtentSize)
| extend HotOriginalSize = format_bytes(HotOriginalSize)
| project-away
Folder,
DocString,
AuthorizedPrincipals,
RetentionPolicy,
CachingPolicy,
ShardingPolicy,
MergePolicy,
StreamingIngestionPolicy,
IngestionBatchingPolicy,
RowOrderPolicy,
TableId'
This example demonstrates how to get information on all tables in the myDb
Database.
The control command to invoke.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This non mandatory parameter determines which Database in your Cluster will be targetted by your control command.
Note
If not supplied, the Database used will be the one specified when you called Connect-Kusto
.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Determines the output type this cmdlet will produce. The default value is PSObject
.
Type: OutputType
Parameter Sets: (All)
Aliases:
Accepted values: PSObject, Json, Csv, DataTable, Html
Required: False
Position: Named
Default value: PSObject
Accept pipeline input: False
Accept wildcard characters: False
Request properties control how a query or command executes and returns results. If no ClientRequestProperties
object is supplied this cmdlet will use default properties.
Note
You can create new request properties using New-KustoClientRequestProperties.
Type: ClientRequestProperties
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters. For more information, see about_CommonParameters.
The output type from this cmdlet is determined by the -OutputType
parameter.
By default, this cmdlet outputs PSObject
.