Automate the VM/Server resources alerts hosted on Azure cloud

Is there any way script to automate the VM/Server resources alerts such as CPU, Memory, DiskSpace Utilization etc., hosted on Azure cloud. Like a powershell script which can give all these details?
Any help would be appreciated…

You mean a way to query those?