在 Azure-Vm 规模集上获取现有的 IaaSDiagnostics
Get existing IaaSDiagnostics on Azure-Vm Scale Set
正在尝试查找规模集上的现有 IaaSDiagnostics,但无法将设置提取为字符串输出,
试过这个但没有太大帮助,因为 returns JProperty 形式,
Get-AzureRmVmss -ResourceGroupName usptenant-DAT-EastUS -VMScaleSetName besfvm `
| Select-Object -ExpandProperty VirtualMachineProfile `
| Select-Object -ExpandProperty ExtensionProfile `
| %{ $_.Extensions[1] | Select-Object -ExpandProperty Settings }
我在访问诊断信息时遇到了类型转换或完全错误的方向。
找到了使用 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'
正在尝试查找规模集上的现有 IaaSDiagnostics,但无法将设置提取为字符串输出,
试过这个但没有太大帮助,因为 returns JProperty 形式,
Get-AzureRmVmss -ResourceGroupName usptenant-DAT-EastUS -VMScaleSetName besfvm `
| Select-Object -ExpandProperty VirtualMachineProfile `
| Select-Object -ExpandProperty ExtensionProfile `
| %{ $_.Extensions[1] | Select-Object -ExpandProperty Settings }
我在访问诊断信息时遇到了类型转换或完全错误的方向。
找到了使用 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'