Bylaw

Gallery › Guest Configuration › Azure built-in policies

[Deprecated]: Audit Windows Server VMs on which Windows Serial Console is not enabled

Converted Initiative Version 1.0.0-deprecated Deprecated

This initiative deploys the policy requirements and audits Windows Server virtual machines on which Windows Serial Console is not enabled. 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 JSONWindowsSerialConsole.json · 69 lines
{
  "properties": {
    "displayName": "[Deprecated]: Audit Windows Server VMs on which Windows Serial Console is not enabled",
    "policyType": "BuiltIn",
    "description": "This initiative deploys the policy requirements and audits Windows Server virtual machines on which Windows Serial Console is not enabled. 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": {
      "EMSPortNumber": {
        "type": "string",
        "metadata": {
          "displayName": "EMS Port Number",
          "description": "An integer indicating the COM port to be used for the Emergency Management Services (EMS) console redirection. For more information on EMS settings, please visit https://aka.ms/gcpolwsc"
        },
        "allowedValues": [
          "1",
          "2",
          "3",
          "4"
        ],
        "defaultValue": "1"
      },
      "EMSBaudRate": {
        "type": "string",
        "metadata": {
          "displayName": "EMS Baud Rate",
          "description": "An integer indicating the baud rate to be used for the Emergency Management Services (EMS) console redirection. For more information on EMS settings, please visit https://aka.ms/gcpolwsc"
        },
        "allowedValues": [
          "9600",
          "19200",
          "38400",
          "57600",
          "115200"
        ],
        "defaultValue": "115200"
      }
    },
    "policyDefinitions": [
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/7a031c68-d6ab-406e-a506-697a19c634b0",
        "definitionVersion": "1.*.*",
        "policyDefinitionReferenceId": "Deploy_WindowsSerialConsole",
        "parameters": {
          "EMSPortNumber": {
            "value": "[parameters('EMSPortNumber')]"
          },
          "EMSBaudRate": {
            "value": "[parameters('EMSBaudRate')]"
          }
        }
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/d7ccd0ca-8d78-42af-a43d-6b7f928accbc",
        "definitionVersion": "1.*.*",
        "policyDefinitionReferenceId": "Audit_WindowsSerialConsole"
      }
    ],
    "versions": [
      "1.0.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/acb6cd8e-45f5-466f-b3cb-ff6fce525f71",
  "name": "acb6cd8e-45f5-466f-b3cb-ff6fce525f71"
}
Bylawacb6cd8e-45f5-466f-b3cb-ff6fce525f71.bylaw.ps1 · 41 lines
# Converted from WindowsSerialConsole.json by ConvertTo-Bylaw.
Initiative 'acb6cd8e-45f5-466f-b3cb-ff6fce525f71' {

    Properties @{
        DisplayName   = '[Deprecated]: Audit Windows Server VMs on which Windows Serial Console is not enabled'
        Description   = 'This initiative deploys the policy requirements and audits Windows Server virtual machines on which Windows Serial Console is not enabled. 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 EMSPortNumber @{
        Type          = 'string'
        AllowedValues = @('1', '2', '3', '4')
        Default       = '1'
        DisplayName   = 'EMS Port Number'
        Description   = 'An integer indicating the COM port to be used for the Emergency Management Services (EMS) console redirection. For more information on EMS settings, please visit https://aka.ms/gcpolwsc'
        JsonName      = 'EMSPortNumber'
    }
    Parameter EMSBaudRate @{
        Type          = 'string'
        AllowedValues = @('9600', '19200', '38400', '57600', '115200')
        Default       = '115200'
        DisplayName   = 'EMS Baud Rate'
        Description   = 'An integer indicating the baud rate to be used for the Emergency Management Services (EMS) console redirection. For more information on EMS settings, please visit https://aka.ms/gcpolwsc'
        JsonName      = 'EMSBaudRate'
    }

    PolicyDefinition @{
        Id          = '7a031c68-d6ab-406e-a506-697a19c634b0'
        ReferenceId = 'Deploy_WindowsSerialConsole'
        Version     = '1.*.*'
        Parameters  = [ordered]@{
            EMSPortNumber = (Param EMSPortNumber)
            EMSBaudRate   = (Param EMSBaudRate)
        }
    }

    PolicyDefinition -Id 'd7ccd0ca-8d78-42af-a43d-6b7f928accbc' -ReferenceId 'Audit_WindowsSerialConsole' -Version '1.*.*'
}

Members (2)

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