Bylaw

Gallery › Guest Configuration › Azure built-in policies

[Deprecated]: Audit Linux VMs that have the specified applications installed

Converted Initiative Version 1.1.0-deprecated Deprecated

This initiative deploys the policy requirements and audits Linux virtual machines that have the specified applications installed. For more information on Guest Configuration policies, please visit https://aka.ms/gcpol

ConvertTo-Bylaw converted this initiative, and proved that the file compiles back to the same definition.

Azure Policy JSONNotInstalledApplicationLinux.json · 44 lines
{
  "properties": {
    "displayName": "[Deprecated]: Audit Linux VMs that have the specified applications installed",
    "policyType": "BuiltIn",
    "description": "This initiative deploys the policy requirements and audits Linux virtual machines that have the specified applications installed. For more information on Guest Configuration policies, please visit https://aka.ms/gcpol",
    "metadata": {
      "version": "1.1.0-deprecated",
      "category": "Guest Configuration",
      "deprecated": true
    },
    "version": "1.1.0",
    "parameters": {
      "ApplicationName": {
        "type": "string",
        "metadata": {
          "displayName": "Application names",
          "description": "A semicolon-separated list of the names of the applications that should not be installed. e.g. 'python; powershell'"
        }
      }
    },
    "policyDefinitions": [
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/884b209a-963b-4520-8006-d20cb3c213e0",
        "definitionVersion": "4.*.*",
        "policyDefinitionReferenceId": "Deploy_NotInstalledApplicationLinux",
        "parameters": {
          "ApplicationName": {
            "value": "[parameters('ApplicationName')]"
          }
        }
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/5b842acb-0fe7-41b0-9f40-880ec4ad84d8",
        "definitionVersion": "4.*.*",
        "policyDefinitionReferenceId": "Audit_NotInstalledApplicationLinux"
      }
    ],
    "versions": [
      "1.1.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/f48bcc78-5400-4fb0-b913-5140a2e5fa20",
  "name": "f48bcc78-5400-4fb0-b913-5140a2e5fa20"
}
Bylawf48bcc78-5400-4fb0-b913-5140a2e5fa20.bylaw.ps1 · 34 lines
# Converted from NotInstalledApplicationLinux.json by ConvertTo-Bylaw.
Initiative 'f48bcc78-5400-4fb0-b913-5140a2e5fa20' {

    Properties @{
        DisplayName   = '[Deprecated]: Audit Linux VMs that have the specified applications installed'
        Description   = 'This initiative deploys the policy requirements and audits Linux virtual machines that have the specified applications installed. For more information on Guest Configuration policies, please visit https://aka.ms/gcpol'
        Version       = '1.1.0-deprecated'
        Category      = 'Guest Configuration'
        Deprecated    = $true
        PolicyVersion = '1.1.0'
    }

    Parameter ApplicationName @{
        Type        = 'string'
        DisplayName = 'Application names'
        Description = 'A semicolon-separated list of the names of the applications that should not be installed. e.g. ''python; powershell'''
        JsonName    = 'ApplicationName'
    }

    PolicyDefinition @{
        Id          = '884b209a-963b-4520-8006-d20cb3c213e0'
        ReferenceId = 'Deploy_NotInstalledApplicationLinux'
        Version     = '4.*.*'
        Parameters  = @{
            ApplicationName = (Param ApplicationName)
        }
    }

    PolicyDefinition @{
        Id          = '5b842acb-0fe7-41b0-9f40-880ec4ad84d8'
        ReferenceId = 'Audit_NotInstalledApplicationLinux'
        Version     = '4.*.*'
    }
}

Members (2)

Source: built-in-policies/policySetDefinitions/Guest Configuration/NotInstalledApplicationLinux.json in Azure/azure-policy, under the MIT licence.