Hi,
You can use policies: Azure Security agent should be installed on your Linux virtual machine scale sets and Azure Security agent should be installed on your Windows virtual machine scale sets to track where the scanner (agent) is not installed or policies Configure supported Linux virtual machine scale sets to automatically install the Azure Security agent and Configure supported Windows machines to automatically install the Azure Security agent to automatically install it on new scale sets or remediate it via Azure Policy.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.