Gallery › Guest Configuration › Azure built-in policies
[Deprecated]: Audit Windows VMs on which the remote host connection status does not match the specified one
Converted Initiative Version 1.0.0-deprecated Deprecated
This initiative deploys the policy requirements and audits Windows virtual machines on which the remote host connection status does not match the specified one. 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 JSONWindowsRemoteConnection.json · 69 lines
{
"properties": {
"displayName": "[Deprecated]: Audit Windows VMs on which the remote host connection status does not match the specified one",
"policyType": "BuiltIn",
"description": "This initiative deploys the policy requirements and audits Windows virtual machines on which the remote host connection status does not match the specified one. 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": {
"host": {
"type": "string",
"metadata": {
"displayName": "Remote Host Name",
"description": "Specifies the Domain Name System (DNS) name or IP address of the remote host machine."
}
},
"port": {
"type": "string",
"metadata": {
"displayName": "Port",
"description": "The TCP port number on the remote host name."
}
},
"shouldConnect": {
"type": "string",
"metadata": {
"displayName": "Should connect to remote host",
"description": "Must be 'True' or 'False'. 'True' indicates that the virtual machine should be able to establish a connection with the remote host specified, so the machine will be non-compliant if it cannot establish a connection. 'False' indicates that the virtual machine should not be able to establish a connection with the remote host specified, so the machine will be non-compliant if it can establish a connection."
},
"allowedValues": [
"True",
"False"
],
"defaultValue": "False"
}
},
"policyDefinitions": [
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/5bb36dda-8a78-4df9-affd-4f05a8612a8a",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "Deploy_WindowsRemoteConnection",
"parameters": {
"host": {
"value": "[parameters('host')]"
},
"port": {
"value": "[parameters('port')]"
},
"shouldConnect": {
"value": "[parameters('shouldConnect')]"
}
}
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/02a84be7-c304-421f-9bb7-5d2c26af54ad",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "Audit_WindowsRemoteConnection"
}
],
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policySetDefinitions/4ddaefff-7c78-4824-9b27-5c344f3cdf90",
"name": "4ddaefff-7c78-4824-9b27-5c344f3cdf90"
}Bylaw4ddaefff-7c78-4824-9b27-5c344f3cdf90.bylaw.ps1 · 47 lines
# Converted from WindowsRemoteConnection.json by ConvertTo-Bylaw.
Initiative '4ddaefff-7c78-4824-9b27-5c344f3cdf90' {
Properties @{
DisplayName = '[Deprecated]: Audit Windows VMs on which the remote host connection status does not match the specified one'
Description = 'This initiative deploys the policy requirements and audits Windows virtual machines on which the remote host connection status does not match the specified one. 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 Host @{
Type = 'string'
DisplayName = 'Remote Host Name'
Description = 'Specifies the Domain Name System (DNS) name or IP address of the remote host machine.'
}
Parameter Port @{
Type = 'string'
DisplayName = 'Port'
Description = 'The TCP port number on the remote host name.'
}
Parameter ShouldConnect @{
Type = 'string'
AllowedValues = @('True', 'False')
Default = 'False'
DisplayName = 'Should connect to remote host'
Description = 'Must be ''True'' or ''False''. ''True'' indicates that the virtual machine should be able to establish a connection with the remote host specified, so the machine will be non-compliant if it cannot establish a connection. ''False'' indicates that the virtual machine should not be able to establish a connection with the remote host specified, so the machine will be non-compliant if it can establish a connection.'
}
PolicyDefinition @{
Id = '5bb36dda-8a78-4df9-affd-4f05a8612a8a'
ReferenceId = 'Deploy_WindowsRemoteConnection'
Version = '1.*.*'
Parameters = [ordered]@{
host = (Param Host)
port = (Param Port)
shouldConnect = (Param ShouldConnect)
}
}
PolicyDefinition @{
Id = '02a84be7-c304-421f-9bb7-5d2c26af54ad'
ReferenceId = 'Audit_WindowsRemoteConnection'
Version = '1.*.*'
}
}Members (2)
- [Deprecated]: Deploy prerequisites to audit Windows VMs on which the remote connection status does not match the specified one
- [Deprecated]: Show audit results from Windows VMs on which the remote connection status does not match the specified one
Source: built-in-policies/policySetDefinitions/Guest Configuration/WindowsRemoteConnection.json in Azure/azure-policy, under the MIT licence.
Bylaw