Bylaw

Gallery › Guest Configuration › Azure built-in policies

[Deprecated]: Audit Windows VMs that do not have the specified applications installed

Converted Initiative Version 1.0.0-deprecated Deprecated

This initiative deploys the policy requirements and audits Windows virtual machines that do not 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 JSONInstalledApp.json · 44 lines
{
  "properties": {
    "displayName": "[Deprecated]: Audit Windows VMs that do not have the specified applications installed",
    "policyType": "BuiltIn",
    "description": "This initiative deploys the policy requirements and audits Windows virtual machines that do not have the specified applications installed. For more information on Guest Configuration policies, please visit https://aka.ms/gcpol",
    "metadata": {
      "version": "1.0.0-deprecated",
      "category": "Guest Configuration",
      "deprecated": true
    },
    "version": "1.0.0",
    "parameters": {
      "installedApplication": {
        "type": "string",
        "metadata": {
          "displayName": "Application names (supports wildcards)",
          "description": "A semicolon-separated list of the names of the applications that should be installed. e.g. 'Microsoft SQL Server 2014 (64-bit); Microsoft Visual Studio Code' or 'Microsoft SQL Server 2014*' (to match any application starting with 'Microsoft SQL Server 2014')"
        }
      }
    },
    "policyDefinitions": [
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/12f7e5d0-42a7-4630-80d8-54fb7cff9bd6",
        "definitionVersion": "1.*.*",
        "policyDefinitionReferenceId": "Deploy_InstalledApp",
        "parameters": {
          "installedApplication": {
            "value": "[parameters('installedApplication')]"
          }
        }
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/5e393799-e3ca-4e43-a9a5-0ec4648a57d9",
        "definitionVersion": "1.*.*",
        "policyDefinitionReferenceId": "Audit_InstalledApp"
      }
    ],
    "versions": [
      "1.0.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/25ef9b72-4af2-4501-acd1-fc814e73dde1",
  "name": "25ef9b72-4af2-4501-acd1-fc814e73dde1"
}
Bylaw25ef9b72-4af2-4501-acd1-fc814e73dde1.bylaw.ps1 · 29 lines
# Converted from InstalledApp.json by ConvertTo-Bylaw.
Initiative '25ef9b72-4af2-4501-acd1-fc814e73dde1' {

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

    Parameter InstalledApplication @{
        Type        = 'string'
        DisplayName = 'Application names (supports wildcards)'
        Description = 'A semicolon-separated list of the names of the applications that should be installed. e.g. ''Microsoft SQL Server 2014 (64-bit); Microsoft Visual Studio Code'' or ''Microsoft SQL Server 2014*'' (to match any application starting with ''Microsoft SQL Server 2014'')'
    }

    PolicyDefinition @{
        Id          = '12f7e5d0-42a7-4630-80d8-54fb7cff9bd6'
        ReferenceId = 'Deploy_InstalledApp'
        Version     = '1.*.*'
        Parameters  = @{
            installedApplication = (Param InstalledApplication)
        }
    }

    PolicyDefinition -Id '5e393799-e3ca-4e43-a9a5-0ec4648a57d9' -ReferenceId 'Audit_InstalledApp' -Version '1.*.*'
}

Members (2)

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