Mihir Hatankar, thank you for posting this question on Microsoft Q&A.
There is no direct way to generate an alert from PowerShell or using any API. However, there are ways through which this can be achieved, 2 of which are given below:
- If you are only interested in getting an email notification with this information, you may use the information available in the following document to send email from Azure Automation Runbook.
- Another way would be sending the information to Log Analytics Workspace's custom table as a log and creating log-based alert rule to trigger. Details of which are below. The query in this case will depend on the custom table created and its columns.
Tutorial: Send data to Azure Monitor Logs with Logs ingestion API (Azure portal)
Tutorial: Create a log query alert for an Azure resource
Hope this helps.
If the answer did not help, please add more context/follow-up question for it, and we will help you out. Else, if the answer helped, please click Accept answer so that it can help others in the community looking for help on similar topics.