You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过PowerShell获取指定Azure应用服务的证书详情

获取特定应用服务的SSL证书详情

你可以通过在az webapp config ssl list命令中添加--name参数,指定目标应用服务的名称,直接获取该应用绑定的SSL证书详情,而非整个资源组的所有证书。

直接指定应用服务的命令示例

az webapp config ssl list --resource-group "TestResourceGroup" --name "YourSpecificAppServiceName" | ConvertFrom-Json

备选方案:过滤已获取的全量证书

如果已经执行过全量查询,也可以用PowerShell的筛选功能,从资源组的所有证书中挑出属于目标应用服务的条目:

  • 通过应用名称筛选:
$allCerts = az webapp config ssl list --resource-group "TestResourceGroup" | ConvertFrom-Json
$targetAppCerts = $allCerts | Where-Object { $_.siteName -eq "YourSpecificAppServiceName" }
  • 通过应用绑定的域名筛选:
$allCerts = az webapp config ssl list --resource-group "TestResourceGroup" | ConvertFrom-Json
$targetAppCerts = $allCerts | Where-Object { $_.hostNames -contains "your-app-custom-domain.com" }

内容的提问来源于stack exchange,提问作者Tracey

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.16 05:15:35