【问题标题】:Get existing IaaSDiagnostics on Azure-Vm Scale Set获取 Azure-Vm 规模集上的现有 IaaSDiagnostics
【发布时间】:2017-08-04 12:33:52
【问题描述】:

试图查找规模集上现有的 IaaSDiagnostics 是什么,但无法将设置提取为字符串输出,

试过了,但没有太大帮助,因为以 JProperty 形式返回,

Get-AzureRmVmss -ResourceGroupName usptenant-DAT-EastUS -VMScaleSetName besfvm `
| Select-Object -ExpandProperty VirtualMachineProfile `
| Select-Object -ExpandProperty ExtensionProfile `
| %{  $_.Extensions[1] | Select-Object -ExpandProperty Settings }

我被类型转换困住了,或者在访问诊断信息时完全走错了方向。

【问题讨论】:

    标签: powershell azure-service-fabric azure-vm-scale-set


    【解决方案1】:

    使用 Azure-Cli 找到了一种方法

    使用

    az vmss extension show --name
                           --resource-group
                           --vmss-name
    

    并将输出导出到 Json 文件,确保将扩展名设置为 Json 以进行文件输出,您将获得 Base64 编码字符串。

    编辑:

    使用 powerShell

    (Get-AzureServiceAvailableExtension -ExtensionName 'PaaSDiagnostics' -ProviderNamespace 'Microsoft.Azure.Diagnostics').PublicConfigurationSchema | Out-File –Encoding utf8 -FilePath 'C:\temp\WadConfig.xsd'
    

    【讨论】:

      猜你喜欢
      • 2019-10-26
      • 1970-01-01
      • 2023-03-20
      • 1970-01-01
      • 2016-11-20
      • 2019-02-25
      • 1970-01-01
      • 1970-01-01
      • 2019-05-01
      相关资源
      最近更新 更多