通过 PowerShell 创建的 Azure 诊断设置在 Azure 门户中不可见

标签 azure powershell azure-powershell azure-logic-apps azure-diagnostics

我正在通过 (Az) PowerShell 将诊断设置添加到定义的资源组中的所有逻辑应用。

$Workspace = Get-AzOperationalInsightsWorkspace -Name "dev-shared-monitoring-loganalytics" -ResourceGroupName "dev-shared-monitoring"

$LogicApps = Get-AzResource -ResourceType Microsoft.Logic/workflows -ResourceGroupName "*-dev-*"

foreach ($LogicApp in $LogicApps) {
    Set-AzDiagnosticSetting -ResourceId $LogicApp.ResourceId -WorkspaceId $Workspace.ResourceId -Enabled $true -Name "SendToMonitoring"
}

成功创建后,我可以通过 PowerShell Get-AzDiagnosticSetting 获取它们,但它们在 Azure 门户中不可见:

Diagnostic Settings not visible

最佳答案

我使用了您提供的命令,并且能够在门户上查看诊断设置:

enter image description here

尝试打开新窗口或以隐身模式打开门户。

关于通过 PowerShell 创建的 Azure 诊断设置在 Azure 门户中不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56147046/

相关文章:

Azure 函数无法识别 Get-AzADApplication

Azure 突触 : Upload directory of py files in Spark job reference files

php - 如何将 laravel 5 Web 应用程序及其数据库托管到 azure?

performance - 我可以在部署后监控 Azure 应用程序的性能吗(类似于分析)

powershell - 在Exchange联系人中查找附件的CID引用

xml - System.Xml.XmlElement 类型的 Powershell 格式输出

visual-studio-2012 - IISExpress开发证书未安装

java - 如何使用 java 读取 Windows 日志 evt/evtx 文件

azure - 如何使用 Get-AzVM 输出订阅名称

azure - 如何将输入参数传递给 Start-NewOrchestration powershell 命令 let