You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/automation/automation-dsc-onboarding.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -347,6 +347,18 @@ For added security, the primary and secondary access keys of an Automation accou
347
347
regenerated at any time (on the **Manage Keys** page) to prevent future node registrations using
348
348
previous keys.
349
349
350
+
## Certificate expiration and re-registration
351
+
352
+
After registering a machine as a DSC node in Azure Automation State Configuration, there are a
353
+
number of reasons why you may need to re-register that node in the future:
354
+
355
+
- For versions of Windows Server prior to Windows Server 2019, each node automatically negotiates a unique certificate for authentication that expires after one year. Currently, the PowerShell DSC registration protocol cannot automatically renew certificates when they are nearing expiration, so you need to re-register the nodes after a year's time. Before re-registering, ensure that each node is running Windows Management Framework 5.0 RTM. If a node's authentication certificate expires, and the node is not re-registered, the node is unable to communicate with Azure Automation and is marked 'Unresponsive.' re-registration performed 90 days or less from the certificate expiration time, or at any point after the certificate expiration time, will result in a new certificate being generated and used. A resolution to this issue is included in Windows Server 2019 and later.
356
+
- To change any [PowerShell DSC Local Configuration Manager values](/powershell/scripting/dsc/managing-nodes/metaConfig4) that were set during initial registration of the node, such as ConfigurationMode. Currently, these DSC agent values can only be changed through re-registration. The one exception is the Node Configuration assigned to the node -- this can be changed in Azure Automation DSC directly.
357
+
358
+
re-registration can be performed in the same way you registered the node initially, using any of the
359
+
onboarding methods described in this document. You do not need to un-register a node from Azure
360
+
Automation State Configuration before re-registering it.
Azure Automation State Configuration lets you easily onboard Azure Windows VMs for configuration
@@ -363,17 +375,7 @@ Azure portal navigate to the VM being onboarded, then click **Extensions** under
363
375
click **DSC** or **DSCForLinux** depending on your operating system. For more details, you can
364
376
click **View detailed status**.
365
377
366
-
## Certificate expiration and reregistration
367
-
368
-
After registering a machine as a DSC node in Azure Automation State Configuration, there are a
369
-
number of reasons why you may need to reregister that node in the future:
370
-
371
-
- For versions of Windows Server prior to Windows Server 2019, each node automatically negotiates a unique certificate for authentication that expires after one year. Currently, the PowerShell DSC registration protocol cannot automatically renew certificates when they are nearing expiration, so you need to reregister the nodes after a year's time. Before reregistering, ensure that each node is running Windows Management Framework 5.0 RTM. If a node's authentication certificate expires, and the node is not reregistered, the node is unable to communicate with Azure Automation and is marked 'Unresponsive.' Reregistration performed 90 days or less from the certificate expiration time, or at any point after the certificate expiration time, will result in a new certificate being generated and used. A resolution to this issue is included in Windows Server 2019 and later.
372
-
- To change any [PowerShell DSC Local Configuration Manager values](/powershell/scripting/dsc/managing-nodes/metaConfig4) that were set during initial registration of the node, such as ConfigurationMode. Currently, these DSC agent values can only be changed through reregistration. The one exception is the Node Configuration assigned to the node -- this can be changed in Azure Automation DSC directly.
373
-
374
-
Reregistration can be performed in the same way you registered the node initially, using any of the
375
-
onboarding methods described in this document. You do not need to unregister a node from Azure
376
-
Automation State Configuration before reregistering it.
378
+
For more information on troubleshooting, see [Troubleshooting issues with Azure Automation Desired State Configuration (DSC)](./troubleshoot/desired-state-configuration.md).
Copy file name to clipboardExpand all lines: articles/automation/troubleshoot/desired-state-configuration.md
+105Lines changed: 105 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,68 @@ This error is normally caused by a firewall, the machine being behind a proxy se
89
89
90
90
Verify your machine has access to the proper endpoints for Azure Automation DSC and try again. For a list of ports and addresses needed, see [network planning](../automation-dsc-overview.md#network-planning)
91
91
92
+
### <aname="unauthorized"><a/>Scenario: Status reports return response code "Unauthorized"
93
+
94
+
#### Issue
95
+
96
+
When registering a Node with State Configuration (DSC) you receive one of the following error messages:
97
+
98
+
```error
99
+
The attempt to send status report to the server https://{your automation account url}/accounts/xxxxxxxxxxxxxxxxxxxxxx/Nodes(AgentId='xxxxxxxxxxxxxxxxxxxxxxxxx')/SendReport returned unexpected response code Unauthorized.
100
+
```
101
+
102
+
```error
103
+
VM has reported a failure when processing extension 'Microsoft.Powershell.DSC / Registration of the Dsc Agent with the server failed.
104
+
```
105
+
106
+
### Cause
107
+
108
+
This issue is caused by a bad or expired certificate. For more information, see [Certificate expiration and reregistration](../automation-dsc-onboarding.md#certificate-expiration-and-re-registration).
109
+
110
+
### Resolution
111
+
112
+
Follow the steps listed below to re-register the failing DSC node.
113
+
114
+
First, un-register the node using the following steps.
115
+
116
+
1. From the Azure portal, under **Home** -> **Automation Accounts**-> {Your Automation Account} -> **State configuration (DSC)**
117
+
2. Click "Nodes", and click on the node having trouble.
118
+
3. Click "Unregister" to un-register the node.
119
+
120
+
Second, uninstall the DSC extension from the node.
121
+
122
+
1. From the Azure portal, under **Home** -> **Virtual Machine** -> {Failing node} -> **Extensions**
123
+
2. Click "Microsoft.Powershell.DSC".
124
+
3. Click "Uninstall", to uninstall the PowerShell DSC extension.
125
+
126
+
Third, remove all bad or expired certificates from the node.
127
+
128
+
On the failing node from an elevated Powershell Prompt, run the following:
129
+
130
+
```powershell
131
+
$certs = @()
132
+
$certs += dir cert:\localmachine\my | ?{$_.FriendlyName -like "DSC"}
133
+
$certs += dir cert:\localmachine\my | ?{$_.FriendlyName -like "DSC-OaaS Client Authentication"}
134
+
$certs += dir cert:\localmachine\CA | ?{$_.subject -like "CN=AzureDSCExtension*"}
135
+
"";"== DSC Certificates found: " + $certs.Count
136
+
$certs | FL ThumbPrint,FriendlyName,Subject
137
+
If (($certs.Count) -gt 0)
138
+
{
139
+
ForEach ($Cert in $certs)
140
+
{
141
+
RD -LiteralPath ($Cert.Pspath)
142
+
}
143
+
}
144
+
```
145
+
146
+
Finally, re-register the failing node using the following steps.
147
+
148
+
1. From the Azure portal, under **Home** -> **Automation Accounts** -> {Your Automation Account} -> **State configuration (DSC)**
149
+
2. Click "Nodes".
150
+
3. Click the "Add" button.
151
+
4. Select the failing node.
152
+
5. Click "Connect", and select your desired options.
153
+
92
154
### <aname="failed-not-found"></a>Scenario: Node is in failed status with a "Not found" error
93
155
94
156
#### Issue
@@ -187,6 +249,49 @@ This error typically occurs when the node is assigned a node configuration name
187
249
* Make sure that you're assigning the node with a node configuration name that exactly matches the name in the service.
188
250
* You can choose to not include the node configuration name, which will result in onboarding the node but not assigning a node configuration
189
251
252
+
### <aname="cross-subscription"></a>Scenario: Registering a node with PowerShell returns the error "One or more errors occurred"
253
+
254
+
#### Issue
255
+
256
+
When registering a node using `Register-AzAutomationDSCNode` or `Register-AzureRMAutomationDSCNode`, you receive the following error.
257
+
258
+
```error
259
+
One or more errors occurred.
260
+
```
261
+
262
+
#### Cause
263
+
264
+
This error occurs when you attempt to register a node that lives in a separate subscription than the Automation Account.
265
+
266
+
#### Resolution
267
+
268
+
Treat the cross-subscription node as though it lives in a separate cloud, or on-premise.
269
+
270
+
Follow the steps below to register the node.
271
+
272
+
* Windows - [Physical/virtual Windows machines on-premises, or in a cloud other than Azure/AWS](../automation-dsc-onboarding.md#physicalvirtual-windows-machines-on-premises-or-in-a-cloud-other-than-azureaws).
273
+
* Linux - [Physical/virtual Linux machines on-premises, or in a cloud other than Azure](../automation-dsc-onboarding.md#physicalvirtual-linux-machines-on-premises-or-in-a-cloud-other-than-azure).
0 commit comments