[英]Deploying Azure sentinel analytics rules in bulk with Powershell
I am trying to deploy around 70 log analytics rules in to an environment's Azure Sentinel with Powershell so I don't have to do this manually one by one.我正在尝试使用 Powershell 将大约 70 个日志分析规则部署到环境的 Azure Sentinel 中,因此我不必一一手动执行此操作。 I got the Analyticsrules.ps1 and rules.json which includes all the rules I want to deploy.我得到了 Analyticsrules.ps1 和 rules.json,其中包括我想要部署的所有规则。
When I run it, I get this error: https://i.stack.imgur.com/nz9S4.png当我运行它时,出现此错误: https : //i.stack.imgur.com/nz9S4.png
"Cannot bind argument to parameter 'path' because it is null" “无法将参数绑定到参数‘路径’,因为它为空”
Does anyone know what I am doing wrong?有谁知道我做错了什么? I can show the json file as well but its really long.我也可以显示 json 文件,但它真的很长。
As mentioned in the error, the path parameter is null.如错误中所述,路径参数为空。
Please make sure $env:Pipeline_Workspace
and $artifactPath
are not null.请确保$env:Pipeline_Workspace
和$artifactPath
不为空。
$artifactPath = Join-Path $env:Pipeline_Workspace $artifactName
$rulesFilePath = Join-Path $artifactPath $RulesFile
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.