Skip to content

Commit 0f1cfce

Browse files
authored
Merge branch 'main' into Branch-CI6197
2 parents 6d71bfe + a4cb5c1 commit 0f1cfce

File tree

5 files changed

+118
-47
lines changed

5 files changed

+118
-47
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: Troubleshoot Error Codes During Runbook Execution in Azure Automation
3+
description: Helps you troubleshoot some errors that occur during runbook execution in Azure Automation.
4+
ms.date: 06/27/2025
5+
ms.reviewer: adoyle, v-weizhu
6+
ms.service: azure-automation
7+
ms.custom: sap:Runbook not working as expected
8+
---
9+
# Troubleshoot error codes during runbook execution in Azure Automation
10+
11+
When using runbooks in Azure Automation, you might encounter issues due to runtime or PowerShell exceptions or specific error messages. This article lists some issues and provides solutions to them.
12+
13+
> [!NOTE]
14+
> Azure Automation enables recovery of runbooks deleted in the last 29 days. You can restore the deleted runbook by running a PowerShell script as a job in your Automation account. For more information, see [Restore a deleted runbook](/azure/automation/manage-runbooks#restore-deleted-runbook).
15+
16+
## Troubleshoot error messages
17+
18+
Review the following table to resolve runbook execution-related error messages:
19+
20+
|Error|Description|Solution|
21+
|-----|-----------|
22+
|Unable to create a new Automation job in the West Europe region.|This issue occurs due to the scalability limits of the Automation service in the West Europe region. |To resolve this issue, follow the steps in [Unable to create new Automation job in West Europe region](/azure/automation/troubleshoot/runbooks#scenario-unable-to-create-new-automation-job-in-west-europe-region).|
23+
|`The subscription cannot be found.`|This issue can occur when the runbook doesn't use a managed identity to access Azure resources. |To resolve this issue, follow the steps in [Unable to find the Azure subscription](/azure/automation/troubleshoot/runbooks#unable-to-find-subscription).|
24+
|`Strong authentication enrollment is required.`|If you have multifactor authentication on your Azure account, you can't use a Microsoft Entra user to authenticate to Azure.|To resolve this issue, see [Authentication to Azure fails because multifactor authentication is enabled](/azure/automation/troubleshoot/runbooks#auth-failed-mfa).|
25+
|Runbook fails with "No permission" or some variation.|The managed identity might not have the same permissions to Azure resources as your current account.|Make sure that your managed identity [has permission to access any resources](/azure/role-based-access-control/role-assignments-portal) used in your script.|
26+
|Error: "429: The request rate is currently too large. Please try again."|This error can occur when retrieving job output from a runbook that has many verbose streams.|To resolve this error, see [The request rate is too large](/azure/automation/troubleshoot/runbooks#429).|
27+
|`400 Bad Request.`|A "400 Bad Request" error can occur for several reasons. First, verify if the runbook works outside of Azure Automation. Typically, the runbook code doesn't work with this error due to:<br><br>- Missing values.<br>- Wrong values being passed.<br>- Older modules being used.<br>- A referenced resource being disabled; for example, the runbook calls a disabled or expired webhook.|To resolve this error, see [400 Bad Request status when calling a webhook](/azure/automation/troubleshoot/runbooks#expired%20webhook).|
28+
|`Resource not found.`|Check the values provided for the resource. |The three values to check are:<br><br>- Resource name<br>- Resource group name<br>- Subscription<br><br>Confirm that the runbook has permissions in the subscription that contains the resource. To change the subscription, you can use the `Set-AzContext` or `az account set` command together with the `-DefaultProfile` parameter. Many commands provide a subscription parameter that allows a different subscription to be used than the current one.<br>Sign in to the Microsoft Azure portal. Find the resource being used and examine the resource name, resource group, and subscription.|
29+
30+
If none of these solutions addresses your issue, see [Troubleshoot runbook issues](/azure/automation/troubleshoot/runbooks).
31+
32+
> [!NOTE]
33+
> Before opening a case, follow the steps in [Data to collect when opening a case for Azure Automation](/azure/automation/troubleshoot/collect-data-microsoft-azure-automation-case). This process will help us resolve your case as quickly as possible.
34+
35+
## References
36+
37+
- [Start a runbook in Azure Automation](/azure/automation/start-runbooks)
38+
- [Run Automation runbooks on a Hybrid Runbook Worker](/azure/automation/automation-hrw-run-runbooks)
39+
40+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

support/azure/automation/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
href: welcome-automation.yml
33
- name: Runbook not working as expected
44
items:
5+
- name: Troubleshoot error codes during runbook execution
6+
href: runbooks/error-running-powershell-runbook.md
57
- name: Runbook jobs get suspended
68
href: runbooks/runbook-job-suspended.md
79
- name: Troubleshoot issues with python packages

support/azure/automation/welcome-automation.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ landingContent:
2121
- title: Runbook not working as expected
2222
linkLists:
2323
- linkListType: how-to-guide
24-
links:
24+
links:
2525
- text: Runbook jobs get suspended
26-
url: runbooks/runbook-job-suspended.md
26+
url: runbooks/runbook-job-suspended.md
27+
- text: Troubleshoot error codes during runbook execution
28+
url: runbooks/error-running-powershell-runbook.md
2729
- text: Troubleshoot issues with python packages
2830
url: runbooks/error-running-python-runbook.md
2931
- text: Troubleshoot issues with runbook execution start time
15.1 KB
Loading
Lines changed: 72 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Remote Desktop listener certificate configurations
33
description: Describes the methods to configure RDP listener certificates in Windows Server 2012 R2 and Windows Server 2012.
4-
ms.date: 06/17/2025
4+
ms.date: 06/27/2025
55
manager: dcscontentpm
66
audience: itpro
77
ms.topic: troubleshooting
@@ -13,41 +13,34 @@ zone_pivot_groups: rdp-windows-server-versions
1313
---
1414
# Remote Desktop listener certificate configurations
1515

16-
This article describes the methods to configure listener certificates on a Windows Server that is not part of a Remote Desktop Services (RDS) deployment.
16+
This article describes the methods to configure listener certificates on a Windows Server that isn't part of a Remote Desktop Services (RDS) deployment.
1717

1818
_Original KB number:_ &nbsp; 3042780
1919

2020
## About Remote Desktop server listener availability
2121

22-
The listener component runs on the Remote Desktop server and is responsible for listening to and accepting new Remote Desktop Protocol (RDP) client connections. This lets users establish new remote sessions on the Remote Desktop server. There is a listener for each Remote Desktop Services connection that exists on the Remote Desktop server. Connections can be created and configured by using the Remote Desktop Services Configuration tool.
22+
The listener component runs on the Remote Desktop server and is responsible for listening to and accepting new Remote Desktop Protocol (RDP) client connections. This lets users establish new remote sessions on the Remote Desktop server. There's a listener for each Remote Desktop Services connection that exists on the Remote Desktop server. Connections can be created and configured by using the Remote Desktop Services Configuration tool.
2323

2424
## Configure Remote Desktop server listener certificate
2525

26-
The MMC method is not available starting from Windows Server 2012 or Windows Server 2012 R2. However, you can always configure the RDP listener by using WMI or the registry.
26+
### [WMI](#tab/wmi)
2727

28-
::: zone pivot="windows-server-pre-2012"
29-
30-
### [MMC](#tab/mmc)
31-
32-
The Remote Desktop Configuration Manager MMC snap-in enables you direct access to the RDP listener. In the snap-in, you can bind a certificate to the listener and in turn, enforce SSL security for the RDP sessions.
33-
34-
::: zone-end
35-
36-
### [Windows Management Instrumentation (WMI)](#tab/wmi)
37-
38-
The configuration data for the RDS listener is stored in the `Win32_TSGeneralSetting` class in WMI under the `Root\CimV2\TerminalServices` namespace.
28+
The configuration data for the RDS listener is stored in the `Win32_TSGeneralSetting` class in Windows Management Instrumentation (WMI) under the `Root\CimV2\TerminalServices` namespace.
3929

4030
The certificate for the RDS listener is referenced through the **Thumbprint** value of that certificate on a **SSLCertificateSHA1Hash** property. The thumbprint value is unique to each certificate.
4131

4232
> [!NOTE]
43-
> Before you run the wmic commands, the certificate that you want to use must be imported to the Personal certificate store for the computer account. If you do not import the certificate, you will receive an **Invalid Parameter** error.
33+
> Before you run the commands, the certificate that you want to use must be imported to the **Personal** certificate store for the computer account (via `certlm.msc`). If you don't import the certificate, you'll receive an **Invalid Parameter** error.
4434
4535
To configure a certificate by using WMI, follow these steps:
4636

4737
1. Open the properties dialog for your certificate and select the **Details** tab.
48-
2. Scroll down to the **Thumbprint** field and copy the space delimited hexadecimal string into something like Notepad.
4938

50-
The following screenshot is an example of the certificate thumbprint in the **Certificate** properties:
39+
::: zone pivot="windows-server-pre-2012"
40+
41+
2. Scroll down to the **Thumbprint** field and copy the space-delimited hexadecimal string into something like Notepad.
42+
43+
The following screenshot shows an example of the certificate thumbprint in the **Certificate** properties:
5144

5245
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/thumbprint-property.png" alt-text="An example of the certificate thumbprint in the Certificate properties.":::
5346

@@ -61,47 +54,65 @@ To configure a certificate by using WMI, follow these steps:
6154

6255
Make sure that this ASCII character is removed before you run the command to import the certificate.
6356

64-
3. Remove all spaces from the string. There may be an invisible ACSII character that is also copied. This is not visible in Notepad. The only way to validate is to copy directly into the Command Prompt window.
57+
3. Remove all spaces from the string. There may be an invisible ACSII character that is also copied. This character isn't visible in Notepad. To validate the string, copy the string directly into the Command Prompt window.
6558

66-
4. At command prompt, run the following wmic command together with the thumbprint value that you obtain in step 3:
67-
68-
::: zone pivot="windows-server-pre-2012"
59+
4. At command prompt, run the following `wmic` command together with the thumbprint value that you obtain in step 3:
6960

7061
```console
7162
wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="THUMBPRINT"
7263
```
7364

65+
The following screenshot shows a successful example:
66+
67+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-wmic-commands.png" alt-text="A successful example of running the `wmic` command together with the thumbprint value that you obtain in step 3." border="false":::
68+
7469
::: zone-end
7570
::: zone pivot="windows-server-2012"
7671

72+
2. Scroll down to the **Thumbprint** field and copy the space-delimited hexadecimal string into a text editor like Notepad.
73+
74+
The following screenshot shows an example of the certificate thumbprint in the **Certificate** properties:
75+
76+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/thumbprint-property.png" alt-text="An example of the certificate thumbprint in the Certificate properties.":::
77+
78+
When you copy the string into Notepad, it should look like the following screenshot:
79+
80+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/thumbprint-string-in-notepad.png" alt-text="Copy and paste the thumbprint string into Notepad.":::
81+
82+
After you remove the spaces in the string, it still contains an invisible ASCII character that is only visible at the command prompt. The following screenshot shows an example:
83+
84+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/ascii-character-in-command-prompt.png" alt-text="The invisible ASCII character that is only shown at the command prompt." border="false":::
85+
86+
Ensure that this ASCII character is removed before you run the command to import the certificate.
87+
88+
3. Remove all spaces from the string. There might be an invisible ACSII character that is also copied. This character isn't visible in Notepad. To validate the string, copy the string directly into the Command Prompt window.
89+
90+
4. At command prompt, run the following `wmic` command together with the thumbprint value that you obtain in step 3:
91+
7792
```console
7893
wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="THUMBPRINT"
7994
```
8095

81-
::: zone-end
82-
::: zone pivot="windows-11-or-server-2025"
96+
The following screenshot shows a successful example:
8397

84-
```console
85-
Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices | Set-WmiInstance -Arguments @{SSLCertificateSHA1Hash="THUMBPRINT"}
86-
```
98+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-wmic-commands.png" alt-text="A successful example of running the `wmic` command together with the thumbprint value that you obtain in step 3." border="false":::
8799

88100
::: zone-end
101+
::: zone pivot="windows-11-or-server-2025"
89102

90-
The following screenshot is a successful example:
103+
2. Scroll down to the **Thumbprint** field and copy it. The following screenshot is an example of the certificate thumbprint in the **Certificate** properties:
91104

92-
::: zone pivot="windows-server-pre-2012"
105+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/thumbprint-property-windows11.png" alt-text="An example of the certificate thumbprint in the Certificate properties.":::
93106

94-
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-wmic-commands.png" alt-text="A successful example of running the wmic command together with the thumbprint value that you obtain in step 3." border="false":::
107+
3. At command prompt, run the following PowerShell command together with the thumbprint value that you obtain in step 2:
95108

96-
::: zone-end
97-
::: zone pivot="windows-server-2012"
109+
```console
110+
Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices | Set-WmiInstance -Arguments @{SSLCertificateSHA1Hash="THUMBPRINT"}
111+
```
98112

99-
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-wmic-commands.png" alt-text="A successful example of running the wmic command together with the thumbprint value that you obtain in step 3." border="false":::
113+
The following screenshot shows a successful example:
100114

101-
::: zone-end
102-
::: zone pivot="windows-11-or-server-2025"
103-
104-
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-powershell-commands.png" alt-text="A successful example of running the powershell command together with the thumbprint value that you obtain in step 3." border="false":::
115+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-powershell-commands.png" alt-text="A successful example of running the PowerShell command together with the thumbprint value that you obtain in step 2." border="false":::
105116

106117
::: zone-end
107118

@@ -134,14 +145,30 @@ To configure a certificate by using registry editor, follow these steps:
134145
135146
To change the permissions, follow these steps on the Certificates snap-in for the local computer:
136147
137-
1. Click **Start**, click **Run**, type *mmc*, and then click **OK**.
138-
2. On the **File** menu, click **Add/Remove Snap-in**.
139-
3. In the **Add or Remove Snap-ins** dialog box, on the **Available snap-ins** list, click **Certificates**, and then click **Add**.
140-
4. In the **Certificates** snap-in dialog box, click **Computer account**, and then click **Next**.
141-
5. In the **Select Computer** dialog box, click **Local computer: (the computer this console is running on)**, and then click **Finish**.
142-
6. In the **Add or Remove Snap-ins** dialog box, click **OK**.
148+
1. Select **Start**, select **Run**, type *mmc*, and then select **OK**.
149+
2. On the **File** menu, select **Add/Remove Snap-in**.
150+
3. In the **Add or Remove Snap-ins** dialog box, on the **Available snap-ins** list, select **Certificates**, and then select **Add**.
151+
4. In the **Certificates** snap-in dialog box, select **Computer account**, and then select **Next**.
152+
5. In the **Select Computer** dialog box, select **Local computer: (the computer this console is running on)**, and then select **Finish**.
153+
6. In the **Add or Remove Snap-ins** dialog box, select **OK**.
143154
7. In the **Certificates** snap-in, on the console tree, expand **Certificates (Local Computer)**, expand **Personal**, and then select the SSL certificate that you want to use.
144155
8. Right-click the certificate, select **All Tasks**, and then select **Manage Private Keys**.
145-
9. In the **Permissions** dialog box, click **Add**, type *NETWORK SERVICE*, click **OK**, select **Read** under the **Allow** check box, and then click **OK**.
156+
9. In the **Permissions** dialog box, select **Add**, type *NETWORK SERVICE*, select **OK**, select **Read** under the **Allow** check box, and then select **OK**.
146157
147-
---
158+
### [MMC](#tab/mmc)
159+
160+
::: zone pivot="windows-server-pre-2012"
161+
162+
The Remote Desktop Configuration Manager Microsoft Management Console (MMC) snap-in enables you direct access to the RDP listener. In the snap-in, you can bind a certificate to the listener and in turn, enforce SSL security for the RDP sessions.
163+
164+
::: zone-end
165+
::: zone pivot="windows-server-2012"
166+
167+
The Microsoft Management Console (MMC) method isn't available starting from Windows Server 2012 or Windows Server 2012 R2. However, you can always configure the RDP listener by using WMI or the registry.
168+
169+
::: zone-end
170+
::: zone pivot="windows-11-or-server-2025"
171+
172+
The Microsoft Management Console (MMC) method isn't available starting from Windows Server 2012 or Windows Server 2012 R2. However, you can always configure the RDP listener by using WMI or the registry.
173+
174+
::: zone-end

0 commit comments

Comments
 (0)