最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

azure automation Powershell load assembly from Nuget package - Stack Overflow

programmeradmin4浏览0评论

How can I load and run the Kusto query in the Powershell runbook using the Kusto client Nuget package? On a local machine I can download the package as a Zip file and then extract in then load the types in Powershell as

[System.Reflection.Assembly]::LoadFrom($assemblyPath) | Out-Null

How can i achieve it in Runbook.

How can I load and run the Kusto query in the Powershell runbook using the Kusto client Nuget package? On a local machine I can download the package as a Zip file and then extract in then load the types in Powershell as

[System.Reflection.Assembly]::LoadFrom($assemblyPath) | Out-Null

How can i achieve it in Runbook.

Share Improve this question edited Mar 31 at 19:03 Hilory 2,1417 gold badges14 silver badges30 bronze badges asked Mar 31 at 17:46 user9297554user9297554 4811 gold badge11 silver badges27 bronze badges 1
  • Have you checked this blog! @user9297554 – Jahnavi Commented Apr 1 at 12:36
Add a comment  | 

1 Answer 1

Reset to default 0

Firstly, it is not directly possible to use the Kusto client NuGet package in automation runbooks. You need to have KustoPowerShell module as it is a wrapper module based on .NET Microsoft.Azure.Kusto.Tools Package.

Once it is imported with the required version, you can use Invoke-Kusto-Query function to run the Kusto queries as shown below.

Along with that, you need to install and import the below modules by visiting the shared resources path in an automation account.

  • Az.Kusto, KQL- to run KQL queries directly from the PowerShell.

Note: Check this Github PowerShell function which was implemented to run a KQL query even though the Microsoft.Azure.Kusto.Tools NuGet package doesn't exist.

发布评论

评论列表(0)

  1. 暂无评论