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/state-configuration/remove-node-and-configuration-package.md
+24-13Lines changed: 24 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,16 @@ ms.topic: how-to
10
10
11
11
# How to remove a configuration and node from Automation State Configuration
12
12
13
-
This article covers how to unregister a node managed by Automation State Configuration, and safely remove a PowerShell Desired State Configuration (DSC) configuration from managed nodes. For both Windows and Linux nodes, you need to [unregister the node](#unregister-a-node) and [delete the configuration](#delete-a-configuration-from-the-azure-portal). For Linux nodes only, you can optionally delete the DSC packages from the nodes as well. See [Remove the DSC package from a Linux node](#remove-the-dsc-package-from-a-linux-node).
13
+
This article covers how to unregister a node managed by Automation State Configuration, and safely remove a PowerShell Desired State Configuration (DSC) configuration from managed nodes. For both Windows and Linux nodes, you need to [unregister the node](#unregister-a-node) and [Delete a configuration from the node](#delete-a-configuration-from-the-node). For Linux nodes only, you can optionally delete the DSC packages from the nodes as well. See [Remove the DSC package from a Linux node](#remove-the-dsc-package-from-a-linux-node).
14
14
15
15
## Unregister a node
16
16
17
-
If you no longer want a node to be managed by State Configuration (DSC), you can unregister it from the Azure portal or with Azure PowerShell using the following steps.
17
+
>[!NOTE]
18
+
> Unregistering a node from the service only sets the Local Configuration Manager settings so the node is no longer connecting to the service. This does not effect the configuration that's currently applied to the node, and leaves the related files in place on the node. After you unregister/delete the node, to re-register it, clear the existing configuration files. See [Delete a configuration from the node](#delete-a-configuration-from-the-node).
18
19
19
-
Unregistering a node from the service only sets the Local Configuration Manager settings so the node is no longer connecting to the service. This does not effect the configuration that's currently applied to the node, and leaves the related files in place on the node. You can optionally clean up those files. See [Delete a configuration](#delete-a-configuration).
20
+
If you no longer want a node to be managed by State Configuration (DSC), you can unregister it from the Azure portal or with Azure PowerShell using the following steps.
20
21
21
-
### Unregister in the Azure portal
22
+
# [Azure portal](#tab/azureportal)
22
23
23
24
1. Sign in to the [Azure portal](https://portal.azure.com).
24
25
1. Search for and select **Automation Accounts**.
@@ -30,18 +31,21 @@ Unregistering a node from the service only sets the Local Configuration Manager
30
31
31
32
:::image type="content" source="./media/remove-node-and-configuration-package/unregister-node.png" alt-text="Screenshot of the Node details page highlighting the Unregister button." lightbox="./media/remove-node-and-configuration-package/unregister-node.png":::
32
33
33
-
### Unregister using PowerShell
34
+
#[Azure PowerShell](#tab/powershell)
34
35
35
36
You can also unregister a node using the PowerShell cmdlet [Unregister-AzAutomationDscNode](/powershell/module/az.automation/unregister-azautomationdscnode).
36
37
37
38
>[!NOTE]
38
-
>If your organization still uses the deprecated AzureRM modules, you can use [Unregister-AzureRmAutomationDscNode](/powershell/module/azurerm.automation/unregister-azurermautomationdscnode).
39
+
> If your organization still uses the deprecated AzureRM modules, you can use [Unregister-AzureRmAutomationDscNode](/powershell/module/azurerm.automation/unregister-azurermautomationdscnode).
40
+
41
+
---
42
+
39
43
40
-
## Delete a configuration
44
+
## Delete a configuration from the node
41
45
42
-
When you're ready to remove an imported DSC configuration document (which is a Managed Object Format (MOF) or .mof file) that's assigned to one or more nodes, follow these steps.
46
+
When you're ready to remove an imported DSC configuration document (which is a Managed Object Format (MOF) or .mof file) that's assigned to one or more nodes, follow either of these steps.
43
47
44
-
### Delete a configuration from the Azure portal
48
+
#[Azure portal](#tab/delete-azureportal)
45
49
46
50
You can delete configurations for both Windows and Linux nodes from the Azure portal.
47
51
@@ -57,18 +61,25 @@ You can delete configurations for both Windows and Linux nodes from the Azure po
57
61
58
62
:::image type="content" source="./media/remove-node-and-configuration-package/delete-extension.png" alt-text="Screenshot of deleting an extension." lightbox="./media/remove-node-and-configuration-package/delete-extension.png":::
59
63
60
-
## Manually delete a configuration file from a node
If you don't want to use the Azure portal, you can manually delete the .mof configuration files as follows.
66
+
To manually delete the .mof configuration files, follow the steps:
63
67
64
-
### Delete a Windows configuration using PowerShell
68
+
**Delete a Windows configuration using PowerShell**
65
69
66
70
To remove an imported DSC configuration document (.mof), use the [Remove-DscConfigurationDocument](/powershell/module/psdesiredstateconfiguration/remove-dscconfigurationdocument) cmdlet.
67
71
68
-
### Delete a Linux configuration
72
+
**Delete a Linux configuration**
69
73
70
74
The configuration files are stored in /etc/opt/omi/conf/dsc/configuration/. Remove the .mof files in this directory to delete the node's configuration.
71
75
76
+
77
+
---
78
+
79
+
## Re-register a node
80
+
You can re-register a node just as you registered the node initially, using any of the methods described in [Enable Azure Automation State Configuration](/azure/automation/automation-dsc-onboarding)
81
+
82
+
72
83
## Remove the DSC package from a Linux node
73
84
74
85
This step is optional. Unregistering a Linux node from State Configuration (DSC) doesn't remove the DSC and OMI packages from the machine. Use the commands below to remove the packages as well as all logs and related data.
0 commit comments