Hi,
Where do i find Update qualys-remediate-unhealthy-vms.ps1 script. ?
Thanks,
Shashidhar
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
We have onboard AWS VMs to azure by azure arc agent, now we need to automate enabling of vulnerability assessment (qulays) on VMs. We tried Azure Resource Manager and PowerShell Script (Update qualys-remediate-unhealthy-vms.ps1) but we are facing below error.
ARM
"New-AzResourceGroupDeployment: 6:46:40 PM - The deployment 'r5' failed with error(s). Showing 1 out of 1 error(s).
Status Message: The resource type could not be found in the namespace 'Microsoft.HybridCompute' for api version '2020-01-01'. (Code:InvalidResourceType)
CorrelationId: 676951bb-dd88-4946-821b-510c6071c2ae"
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"virtualMachines": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.HybridCompute/virtualMachines/providers/serverVulnerabilityAssessments",
"apiVersion": "2020-01-01",
"name": "aep0natptest06, '/Microsoft.Security/default"
}
]
}
Script Error
Headers : {[Cache-Control, System.String[]], [Pragma, System.String[]], [x-ms-failure-cause, System.String[]], [x-ms-request-id,
System.String[]]…}
Version : 1.1
StatusCode : 400
Method : GET
Content : {"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'westeurope' and API
version '2015-06-01-preview' for type 'machines'. The supported api-versions are '2019-03-18-preview, 2019-08-02-preview, 2019-12-12,
2020-03-11-preview, 2020-07-30-preview, 2020-08-02, 2020-08-15-preview'. The supported locations are 'westcentralus, westus2,
westeurope, southeastasia, eastus, australiaeast, southcentralus, eastus2, northeurope, uksouth'."}}
Hi,
Where do i find Update qualys-remediate-unhealthy-vms.ps1 script. ?
Thanks,
Shashidhar
Hello @Muhammad Hassan Syed , sorry for the delayed response.
The posted error suggests the Azure Arc Resource provider "Microsoft.HybridCompute" needs to be registered for the desired locations.
Please confirm the RP is registered and do let us know if issue persists.
Follow the visual illustration below to confirm.
Hi olufemiaMSFT,
My issue is resolved now. It was not the problem with resource provider. I have now used updated script. Thank you very much. I am much obliged. I will let you know in case of any issue.