Gallery › EssentialManagement › Azure built-in policies
[Preview]: Enable Essential Machine Management
Converted Initiative Version 1.0.0-preview Preview
Policy initiative to enable Essential Machine Management for Azure Virtual Machines and Arc-enabled servers.
ConvertTo-Bylaw converted this initiative, and proved that the file compiles back to the same definition.
Azure Policy JSONEssentialManagement_Onboarding.json · 318 lines
{
"properties": {
"displayName": "[Preview]: Enable Essential Machine Management",
"policyType": "BuiltIn",
"description": "Policy initiative to enable Essential Machine Management for Azure Virtual Machines and Arc-enabled servers.",
"version": "1.0.0-preview",
"metadata": {
"version": "1.0.0-preview",
"category": "EssentialManagement",
"preview": true
},
"parameters": {
"dataCollectionRuleIdForChangeTracking": {
"type": "String",
"metadata": {
"description": "This is a required input for enabling Change Tracking Service by associating a Data Collection Rule with machines.",
"displayName": "Data Collection Rule ID for Change Tracking"
}
},
"dataCollectionRuleIdForAzureMonitor": {
"type": "String",
"metadata": {
"description": "This is a required input for enabling Azure Monitor Service by associating a Data Collection Rule with machines.",
"displayName": "Data Collection Rule ID for Azure Monitor"
}
},
"deployIfNotExistsPoliciesEffect": {
"type": "String",
"metadata": {
"displayName": "Effect for all deployIfNotExists constituent policies",
"description": "Enable or disable the execution of each of the constituent deployIfNotExists policies in the initiative."
},
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists"
}
},
"policyDefinitions": [
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/59efceea-0c96-497e-a4a1-4eb2290dac15",
"policyDefinitionReferenceId": "AzureUpdateManagerVm-Windows",
"definitionVersion": "4.*.*",
"parameters": {
"osType": {
"value": "Windows"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/59efceea-0c96-497e-a4a1-4eb2290dac15",
"definitionVersion": "4.*.*",
"policyDefinitionReferenceId": "AzureUpdateManagerVm-Linux",
"parameters": {
"osType": {
"value": "Linux"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/bfea026e-043f-4ff4-9d1b-bf301ca7ff46",
"policyDefinitionReferenceId": "AzureUpdateManagerArc-Windows",
"definitionVersion": "2.*.*",
"parameters": {
"osType": {
"value": "Windows"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/bfea026e-043f-4ff4-9d1b-bf301ca7ff46",
"definitionVersion": "2.*.*",
"policyDefinitionReferenceId": "AzureUpdateManagerArc-Linux",
"parameters": {
"osType": {
"value": "Linux"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/b6faa975-0add-4f35-8d1c-70bba45c4424",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "ChangeTrackingDataCollectionRuleAssociationforVm-Windows",
"parameters": {
"dcrResourceId": {
"value": "[parameters('dataCollectionRuleIdForChangeTracking')]"
},
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/b6faa975-0add-4f35-8d1c-70bba45c4424",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "AzureMonitorDataCollectionRuleAssociationforVm-Windows",
"parameters": {
"dcrResourceId": {
"value": "[parameters('dataCollectionRuleIdForAzureMonitor')]"
},
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/ad1eeff9-20d7-4c82-a04e-903acab0bfc1",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "AzureMonitorforVm-Windows",
"parameters": {
"bringYourOwnUserAssignedManagedIdentity": {
"value": false
},
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f08f556c-12ff-464d-a7de-40cb5b6cccec",
"definitionVersion": "2.*.*",
"policyDefinitionReferenceId": "ChangeTrackingforVm-Windows",
"parameters": {
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/bef2d677-e829-492d-9a3d-f5a20fda818f",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "ChangeTrackingDataCollectionRuleAssociationforVm-Linux",
"parameters": {
"dcrResourceId": {
"value": "[parameters('dataCollectionRuleIdForChangeTracking')]"
},
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/bef2d677-e829-492d-9a3d-f5a20fda818f",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "AzureMonitorDataCollectionRuleAssociationforVm-Linux",
"parameters": {
"dcrResourceId": {
"value": "[parameters('dataCollectionRuleIdForAzureMonitor')]"
},
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/56d0ed2b-60fc-44bf-af81-a78c851b5fe1",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "AzureMonitorforVm-Linux",
"parameters": {
"bringYourOwnUserAssignedManagedIdentity": {
"value": false
},
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/ec88097d-843f-4a92-8471-78016d337ba4",
"definitionVersion": "2.*.*",
"policyDefinitionReferenceId": "ChangeTrackingforVm-Linux",
"parameters": {
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/ef9fe2ce-a588-4edd-829c-6247069dcfdb",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "ChangeTrackingDataCollectionRuleAssociationforArc-Windows",
"parameters": {
"dcrResourceId": {
"value": "[parameters('dataCollectionRuleIdForChangeTracking')]"
},
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/ef9fe2ce-a588-4edd-829c-6247069dcfdb",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "AzureMonitorDataCollectionRuleAssociationforArc-Windows",
"parameters": {
"dcrResourceId": {
"value": "[parameters('dataCollectionRuleIdForAzureMonitor')]"
},
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a7acfae7-9497-4a3f-a3b5-a16a50abbe2f",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "AzureMonitorforArc-Windows",
"parameters": {
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/4bb303db-d051-4099-95d2-e3e1428a4cd5",
"definitionVersion": "2.*.*",
"policyDefinitionReferenceId": "ChangeTrackingforArc-Windows",
"parameters": {
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/09a1f130-7697-42bc-8d84-8a9ea17e5192",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "ChangeTrackingDataCollectionRuleAssociationforArc-Linux",
"parameters": {
"dcrResourceId": {
"value": "[parameters('dataCollectionRuleIdForChangeTracking')]"
},
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/09a1f130-7697-42bc-8d84-8a9ea17e5192",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "AzureMonitorDataCollectionRuleAssociationforArc-Linux",
"parameters": {
"dcrResourceId": {
"value": "[parameters('dataCollectionRuleIdForAzureMonitor')]"
},
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/09a1f130-7697-42bc-8d84-8a9ea17e5187",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "AzureMonitorforArc-Linux",
"parameters": {
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/10caed8a-652c-4d1d-84e4-2805b7c07278",
"definitionVersion": "2.*.*",
"policyDefinitionReferenceId": "ChangeTrackingforArc-Linux",
"parameters": {
"effect": {
"value": "[parameters('deployIfNotExistsPoliciesEffect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/3cf2ab00-13f1-4d0c-8971-2ac904541a7e",
"definitionVersion": "4.*.*",
"policyDefinitionReferenceId": "AzurePolicyAndMachineConfigurationWithUserMi"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/497dff13-db2a-4c0f-8603-28fa3b331ab6",
"definitionVersion": "4.*.*",
"policyDefinitionReferenceId": "AzurePolicyAndMachineConfigurationWithoutUserMi"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/385f5831-96d4-41db-9a3c-cd3af78aaae6",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "AzurePolicyAndMachineConfigurationforVm-Windows"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/331e8ea8-378a-410f-a2e5-ae22f38bb0da",
"definitionVersion": "3.*.*",
"policyDefinitionReferenceId": "AzurePolicyAndMachineConfigurationforVm-Linux"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/72650e9f-97bc-4b2a-ab5f-9781a9fcecbc",
"definitionVersion": "2.*.*",
"policyDefinitionReferenceId": "GuestConfigurationSecurityBaseline-Windows",
"parameters": {
"IncludeArcMachines": {
"value": "true"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/fc9b3da7-8347-4380-8e70-0a0361d8dedd",
"definitionVersion": "2.*.*",
"policyDefinitionReferenceId": "GuestConfigurationSecurityBaseline-Linux",
"parameters": {
"IncludeArcMachines": {
"value": "true"
}
}
}
],
"versions": [
"1.0.0-PREVIEW"
]
},
"id": "/providers/Microsoft.Authorization/policySetDefinitions/2dde6d38-95d9-46cd-bb7c-18dabd06b923",
"name": "2dde6d38-95d9-46cd-bb7c-18dabd06b923"
}Bylaw2dde6d38-95d9-46cd-bb7c-18dabd06b923.bylaw.ps1 · 261 lines
# Converted from EssentialManagement_Onboarding.json by ConvertTo-Bylaw.
Initiative '2dde6d38-95d9-46cd-bb7c-18dabd06b923' {
Properties @{
DisplayName = '[Preview]: Enable Essential Machine Management'
Description = 'Policy initiative to enable Essential Machine Management for Azure Virtual Machines and Arc-enabled servers.'
Version = '1.0.0-preview'
Category = 'EssentialManagement'
Preview = $true
PolicyVersion = '1.0.0-preview'
}
Parameter DataCollectionRuleIdForChangeTracking @{
Type = 'String'
DisplayName = 'Data Collection Rule ID for Change Tracking'
Description = 'This is a required input for enabling Change Tracking Service by associating a Data Collection Rule with machines.'
}
Parameter DataCollectionRuleIdForAzureMonitor @{
Type = 'String'
DisplayName = 'Data Collection Rule ID for Azure Monitor'
Description = 'This is a required input for enabling Azure Monitor Service by associating a Data Collection Rule with machines.'
}
Parameter DeployIfNotExistsPoliciesEffect @{
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
DisplayName = 'Effect for all deployIfNotExists constituent policies'
Description = 'Enable or disable the execution of each of the constituent deployIfNotExists policies in the initiative.'
}
PolicyDefinition @{
Id = '59efceea-0c96-497e-a4a1-4eb2290dac15'
ReferenceId = 'AzureUpdateManagerVm-Windows'
Version = '4.*.*'
Parameters = @{
osType = 'Windows'
}
}
PolicyDefinition @{
Id = '59efceea-0c96-497e-a4a1-4eb2290dac15'
ReferenceId = 'AzureUpdateManagerVm-Linux'
Version = '4.*.*'
Parameters = @{
osType = 'Linux'
}
}
PolicyDefinition @{
Id = 'bfea026e-043f-4ff4-9d1b-bf301ca7ff46'
ReferenceId = 'AzureUpdateManagerArc-Windows'
Version = '2.*.*'
Parameters = @{
osType = 'Windows'
}
}
PolicyDefinition @{
Id = 'bfea026e-043f-4ff4-9d1b-bf301ca7ff46'
ReferenceId = 'AzureUpdateManagerArc-Linux'
Version = '2.*.*'
Parameters = @{
osType = 'Linux'
}
}
PolicyDefinition @{
Id = 'b6faa975-0add-4f35-8d1c-70bba45c4424'
ReferenceId = 'ChangeTrackingDataCollectionRuleAssociationforVm-Windows'
Version = '1.*.*'
Parameters = [ordered]@{
dcrResourceId = (Param DataCollectionRuleIdForChangeTracking)
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = 'b6faa975-0add-4f35-8d1c-70bba45c4424'
ReferenceId = 'AzureMonitorDataCollectionRuleAssociationforVm-Windows'
Version = '1.*.*'
Parameters = [ordered]@{
dcrResourceId = (Param DataCollectionRuleIdForAzureMonitor)
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = 'ad1eeff9-20d7-4c82-a04e-903acab0bfc1'
ReferenceId = 'AzureMonitorforVm-Windows'
Version = '1.*.*'
Parameters = [ordered]@{
bringYourOwnUserAssignedManagedIdentity = $false
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = 'f08f556c-12ff-464d-a7de-40cb5b6cccec'
ReferenceId = 'ChangeTrackingforVm-Windows'
Version = '2.*.*'
Parameters = @{
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = 'bef2d677-e829-492d-9a3d-f5a20fda818f'
ReferenceId = 'ChangeTrackingDataCollectionRuleAssociationforVm-Linux'
Version = '1.*.*'
Parameters = [ordered]@{
dcrResourceId = (Param DataCollectionRuleIdForChangeTracking)
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = 'bef2d677-e829-492d-9a3d-f5a20fda818f'
ReferenceId = 'AzureMonitorDataCollectionRuleAssociationforVm-Linux'
Version = '1.*.*'
Parameters = [ordered]@{
dcrResourceId = (Param DataCollectionRuleIdForAzureMonitor)
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = '56d0ed2b-60fc-44bf-af81-a78c851b5fe1'
ReferenceId = 'AzureMonitorforVm-Linux'
Version = '1.*.*'
Parameters = [ordered]@{
bringYourOwnUserAssignedManagedIdentity = $false
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = 'ec88097d-843f-4a92-8471-78016d337ba4'
ReferenceId = 'ChangeTrackingforVm-Linux'
Version = '2.*.*'
Parameters = @{
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = 'ef9fe2ce-a588-4edd-829c-6247069dcfdb'
ReferenceId = 'ChangeTrackingDataCollectionRuleAssociationforArc-Windows'
Version = '1.*.*'
Parameters = [ordered]@{
dcrResourceId = (Param DataCollectionRuleIdForChangeTracking)
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = 'ef9fe2ce-a588-4edd-829c-6247069dcfdb'
ReferenceId = 'AzureMonitorDataCollectionRuleAssociationforArc-Windows'
Version = '1.*.*'
Parameters = [ordered]@{
dcrResourceId = (Param DataCollectionRuleIdForAzureMonitor)
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = 'a7acfae7-9497-4a3f-a3b5-a16a50abbe2f'
ReferenceId = 'AzureMonitorforArc-Windows'
Version = '1.*.*'
Parameters = @{
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = '4bb303db-d051-4099-95d2-e3e1428a4cd5'
ReferenceId = 'ChangeTrackingforArc-Windows'
Version = '2.*.*'
Parameters = @{
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = '09a1f130-7697-42bc-8d84-8a9ea17e5192'
ReferenceId = 'ChangeTrackingDataCollectionRuleAssociationforArc-Linux'
Version = '1.*.*'
Parameters = [ordered]@{
dcrResourceId = (Param DataCollectionRuleIdForChangeTracking)
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = '09a1f130-7697-42bc-8d84-8a9ea17e5192'
ReferenceId = 'AzureMonitorDataCollectionRuleAssociationforArc-Linux'
Version = '1.*.*'
Parameters = [ordered]@{
dcrResourceId = (Param DataCollectionRuleIdForAzureMonitor)
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = '09a1f130-7697-42bc-8d84-8a9ea17e5187'
ReferenceId = 'AzureMonitorforArc-Linux'
Version = '1.*.*'
Parameters = @{
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = '10caed8a-652c-4d1d-84e4-2805b7c07278'
ReferenceId = 'ChangeTrackingforArc-Linux'
Version = '2.*.*'
Parameters = @{
effect = (Param DeployIfNotExistsPoliciesEffect)
}
}
PolicyDefinition @{
Id = '3cf2ab00-13f1-4d0c-8971-2ac904541a7e'
ReferenceId = 'AzurePolicyAndMachineConfigurationWithUserMi'
Version = '4.*.*'
}
PolicyDefinition @{
Id = '497dff13-db2a-4c0f-8603-28fa3b331ab6'
ReferenceId = 'AzurePolicyAndMachineConfigurationWithoutUserMi'
Version = '4.*.*'
}
PolicyDefinition @{
Id = '385f5831-96d4-41db-9a3c-cd3af78aaae6'
ReferenceId = 'AzurePolicyAndMachineConfigurationforVm-Windows'
Version = '1.*.*'
}
PolicyDefinition @{
Id = '331e8ea8-378a-410f-a2e5-ae22f38bb0da'
ReferenceId = 'AzurePolicyAndMachineConfigurationforVm-Linux'
Version = '3.*.*'
}
PolicyDefinition @{
Id = '72650e9f-97bc-4b2a-ab5f-9781a9fcecbc'
ReferenceId = 'GuestConfigurationSecurityBaseline-Windows'
Version = '2.*.*'
Parameters = @{
IncludeArcMachines = 'true'
}
}
PolicyDefinition @{
Id = 'fc9b3da7-8347-4380-8e70-0a0361d8dedd'
ReferenceId = 'GuestConfigurationSecurityBaseline-Linux'
Version = '2.*.*'
Parameters = @{
IncludeArcMachines = 'true'
}
}
}Members (26)
- Configure periodic checking for missing system updates on azure virtual machines
- Configure periodic checking for missing system updates on azure virtual machines
- Configure periodic checking for missing system updates on azure Arc-enabled servers
- Configure periodic checking for missing system updates on azure Arc-enabled servers
- Configure Windows Virtual Machines to be associated with a Data Collection Rule for ChangeTracking and Inventory
- Configure Windows Virtual Machines to be associated with a Data Collection Rule for ChangeTracking and Inventory
- Configure Windows VMs to install AMA for ChangeTracking and Inventory with user-assigned managed identity
- Configure ChangeTracking Extension for Windows virtual machines
- Configure Linux Virtual Machines to be associated with a Data Collection Rule for ChangeTracking and Inventory
- Configure Linux Virtual Machines to be associated with a Data Collection Rule for ChangeTracking and Inventory
- Configure Linux VMs to install AMA for ChangeTracking and Inventory with user-assigned managed identity
- Configure ChangeTracking Extension for Linux virtual machines
- Configure Windows Arc-enabled machines to be associated with a Data Collection Rule for ChangeTracking and Inventory
- Configure Windows Arc-enabled machines to be associated with a Data Collection Rule for ChangeTracking and Inventory
- Configure Windows Arc-enabled machines to install AMA for ChangeTracking and Inventory
- Configure ChangeTracking Extension for Windows Arc machines
- Configure Linux Arc-enabled machines to be associated with a Data Collection Rule for ChangeTracking and Inventory
- Configure Linux Arc-enabled machines to be associated with a Data Collection Rule for ChangeTracking and Inventory
- Configure Linux Arc-enabled machines to to install AMA for ChangeTracking and Inventory
- Configure ChangeTracking Extension for Linux Arc machines
- Add system-assigned managed identity to enable Guest Configuration assignments on virtual machines with no identities
- Add system-assigned managed identity to enable Guest Configuration assignments on VMs with a user-assigned identity
- Deploy the Windows Guest Configuration extension to enable Guest Configuration assignments on Windows VMs
- Deploy the Linux Guest Configuration extension to enable Guest Configuration assignments on Linux VMs
- Windows machines should meet requirements of the Azure compute security baseline
- Linux machines should meet requirements for the Azure compute security baseline
Source: built-in-policies/policySetDefinitions/EssentialManagement/EssentialManagement_Onboarding.json in Azure/azure-policy, under the MIT licence.
Bylaw