I have got the all cloud Service (Classic) Certificate details with expired date, certificate name and his thumbprint
I expect this type of Output
Cloud Service Name Cloud Service Certificate Name Cloud Service Expired Date Cloud Service Thumbprint
Note:- We do not used the AzureRm command
I would suggest you to simple call the rest api for getting Certificate. Here is the api which would give you certificate details which is under one particular resource group.(Example includes Azure web services)
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates?api-version=2016-03-01
Sample request
GET https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates?api-version=2016-03-01
and here is the sample response.
{
"value": [
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282",
"name": "testc6282",
"type": "Microsoft.Web/certificates",
"location": "East US",
"properties": {
"friendlyName": "",
"subjectName": "ServerCert",
"hostNames": [
"ServerCert"
],
"issuer": "CACert",
"issueDate": "2015-11-12T23:40:25+00:00",
"expirationDate": "2039-12-31T23:59:59+00:00",
"thumbprint": "FE703D7411A44163B6D32B3AD9B03E175886EBFE",
"password": "SWsSsd__233$Sdsds#%Sd!"
}
},
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc4912",
"name": "testc4912",
"type": "Microsoft.Web/certificates",
"location": "West US",
"properties": {
"friendlyName": "",
"subjectName": "ServerCert2",
"hostNames": [
"ServerCert2"
],
"issuer": "CACert",
"issueDate": "2015-12-12T23:40:25+00:00",
"expirationDate": "2040-12-31T23:59:59+00:00",
"thumbprint": "FE703D7411A44163B6D32B3AD9B0490D5886EBFE",
"password": "SWsSsd__233$Sdsds#%Sd!"
}
}
]
}
You can find the more details here.
https://docs.microsoft.com/en-us/rest/api/appservice/certificates/listbyresourcegroup
Hope it helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.