sns, thank you for posting this question on Q&A.
Yes, you can definitely implement Azure Policy to enable VMInsights and Crowdstrike agents on Azure VMs automatically. The following points provide additional information.
- VM Insights using Policy - There are built-in Azure Policies and Initiative which helps you enable VM insights automatically on the VMs. For details, see Enable VM insights by using Azure Policy. These initiatives will only need to be assigned to the required scope and it will be done.
- Crowdstrike - There is no built-in policy, therefore it will have to be authored. For this,
DeployIfNotExists
effect of Azure Policy definition can be used coupled with respective ARM templates to install this extension if not available. You may also refer to answer provided here for more details of how this can be achieved - crowdstrike/tenable with Azure Policy - To check these policies, you may use Azure Portal - search for Policy --> Definition. This contains a list of all initiatives and policies which are available - both built-in as well as custom.
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.