Bylaw

Gallery › Guest Configuration › Azure built-in policies

[Deprecated]: Audit Windows VMs that 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 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 JSONNotInstalledApp.json · 44 lines
{
  "properties": {
    "displayName": "[Deprecated]: Audit Windows VMs that have the specified applications installed",
    "policyType": "BuiltIn",
    "description": "This initiative deploys the policy requirements and audits Windows virtual machines that 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": {
      "ApplicationName": {
        "type": "string",
        "metadata": {
          "displayName": "Application names (supports wildcards)",
          "description": "A semicolon-separated list of the names of the applications that should not 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/f0633351-c7b2-41ff-9981-508fc08553c2",
        "definitionVersion": "1.*.*",
        "policyDefinitionReferenceId": "Deploy_NotInstalledApp",
        "parameters": {
          "ApplicationName": {
            "value": "[parameters('ApplicationName')]"
          }
        }
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/7e56b49b-5990-4159-a734-511ea19b731c",
        "definitionVersion": "1.*.*",
        "policyDefinitionReferenceId": "Audit_NotInstalledApp"
      }
    ],
    "versions": [
      "1.0.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/d7fff7ea-9d47-4952-b854-b7da261e48f2",
  "name": "d7fff7ea-9d47-4952-b854-b7da261e48f2"
}
Bylawd7fff7ea-9d47-4952-b854-b7da261e48f2.bylaw.ps1 · 30 lines
# Converted from NotInstalledApp.json by ConvertTo-Bylaw.
Initiative 'd7fff7ea-9d47-4952-b854-b7da261e48f2' {

    Properties @{
        DisplayName   = '[Deprecated]: Audit Windows VMs that have the specified applications installed'
        Description   = 'This initiative deploys the policy requirements and audits Windows virtual machines that 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 ApplicationName @{
        Type        = 'string'
        DisplayName = 'Application names (supports wildcards)'
        Description = 'A semicolon-separated list of the names of the applications that should not 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'')'
        JsonName    = 'ApplicationName'
    }

    PolicyDefinition @{
        Id          = 'f0633351-c7b2-41ff-9981-508fc08553c2'
        ReferenceId = 'Deploy_NotInstalledApp'
        Version     = '1.*.*'
        Parameters  = @{
            ApplicationName = (Param ApplicationName)
        }
    }

    PolicyDefinition -Id '7e56b49b-5990-4159-a734-511ea19b731c' -ReferenceId 'Audit_NotInstalledApp' -Version '1.*.*'
}

Members (2)

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