Azure / Azure/azure-powershell
New-AzKustoScript does not support the .show tables command
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
When executing the following command:
```
New-AzKustoScript `
-ClusterName $clusterInfo["ClusterName"] `
-ResourceGroupName $clusterInfo["ClusterResourceGroup"] `
-DatabaseName $KUSTO_AUDIT_DATABASE_NAME `
-Name "_custom_name" `
-SubscriptionId (Get-AzContext).Subscription.Id `
-ScriptContent ".show tables"
```
the response is:
[BadRequest] The provided script contains unsupported command. The commands must start with the following verbs: '.create, .create-or-alter, .create-merge, .alter, .alter-merge, .enable'
The documentation does not specify a list of supported/unsupported commands.
Please advise which cmdlet can be used to execute other commands (like .show xxx)
### Script or Debug output
_No response_
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 7.3.1
PSEdition Core
GitCommitId 7.3.1
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```
### Module versions
```PowerShell
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.10.4 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 2.1.0 Az.Kusto {Add-AzKustoClusterLanguageExtension, Add-AzKustoDatabasePrincipal, Get-AzKustoAttachedDatabaseConfiguration, Get…
```
### Error output
```PowerShell
PS C:\VSTS\ResourceAudit> REsolve-AzError
Upcoming breaking changes in the cmdlet 'Resolve-AzError' :
The `Resolve-Error` alias will be removed in a future release. Please change any scripts that use this alias to use `Resolve-AzError` instead.
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.
HistoryId: 2
Message : [BadRequest] The provided script contains unsupported command. The commands must start with the following verbs: '.create, .create-or-alter, .create-merge, .alter, .alter-merge, .enable'
StackTrace : at Microsoft.Azure.PowerShell.Cmdlets.Kusto.Kusto.ScriptsCreateOrUpdate_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.Kusto.Kusto.ScriptsCreateOrUpdate_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.Kusto.Kusto.ScriptsCreateOrUpdate(String subscriptionId, String resourceGroupName, String clusterName, String databaseName, String scriptName, IScript body, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.Kusto.Cmdlets.NewAzKustoScript_CreateExpanded.ProcessRecordAsync()
Exception : Microsoft.Azure.PowerShell.Cmdlets.Kusto.Runtime.UndeclaredResponseException
InvocationInfo : {New-AzKustoScript_CreateExpanded}
Line : $result = New-AzKustoScript `
Position : At C:\VSTS\ResourceAudit\scripts\SetupKustoSqlAuditIngestion.ps1:259 char:3
+ $result = New-AzKustoScript `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 2
```
Contributor guide
Assessment
This issue has not been assessed yet.