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
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).
17
+
This article covers how to unregister a node managed by Automation State Configuration, and safely
18
+
removes a PowerShell Desired State Configuration (DSC) configuration from managed nodes. For both
19
+
Windows and Linux nodes, you need to [unregister the node][09] and
20
+
[Delete a configuration from the node][07]. For Linux nodes only, you can optionally delete the DSC
21
+
packages from the nodes as well. See [Remove the DSC package from a Linux node][08].
18
22
19
23
## Unregister a node
20
24
21
-
>[!NOTE]
22
-
> 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).
25
+
> [!NOTE]
26
+
> Unregistering a node from the service only sets the Local Configuration Manager settings so the
27
+
> node is no longer connecting to the service. This doesn't affect the configuration that's
28
+
> currently applied to the node, and leaves the related files in place on the node. After you
29
+
> unregister/delete the node, to re-register it, clear the existing configuration files. See
30
+
> [Delete a configuration from the node][07].
23
31
24
-
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.
32
+
If you no longer want to manage a node using DSC, you can unregister it from the Azure portal or
33
+
with Azure PowerShell using the following steps.
25
34
26
-
# [Azure portal](#tab/azureportal)
35
+
# [Azure portal](#tab/azureportal)
27
36
28
-
1. Sign in to the [Azure portal](https://portal.azure.com).
37
+
1. Sign in to the [Azure portal][11].
29
38
1. Search for and select **Automation Accounts**.
30
39
1. On the **Automation Accounts** page, select your Automation account from the list.
31
40
1. From your Automation account, select **State configuration (DSC)** under **Configuration Management**.
32
-
1. On the **State configuration (DSC)** page, click the **Nodes** tab.
41
+
1. On the **State configuration (DSC)** page, select the **Nodes** tab.
33
42
1. On the **Nodes** tab, select the name of the node you want to unregister.
34
-
1. On the pane for that node, click**Unregister**.
43
+
1. On the pane for that node, select**Unregister**.
35
44
36
45
:::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":::
37
46
38
47
# [Azure PowerShell](#tab/powershell)
39
48
40
-
You can also unregister a node using the PowerShell cmdlet [Unregister-AzAutomationDscNode](/powershell/module/az.automation/unregister-azautomationdscnode).
49
+
You can also unregister a node using the PowerShell cmdlet [Unregister-AzAutomationDscNode][04].
41
50
42
51
>[!NOTE]
43
-
> If your organization still uses the deprecated AzureRM modules, you can use [Unregister-AzureRmAutomationDscNode](/powershell/module/azurerm.automation/unregister-azurermautomationdscnode).
52
+
> If your organization still uses the deprecated AzureRM modules, you can use
53
+
> [Unregister-AzureRmAutomationDscNode][05].
44
54
45
55
---
46
56
47
57
48
58
## Delete a configuration from the node
49
59
50
-
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.
60
+
Use either of the following steps to remove an imported DSC configuration document (`.mof` file)
61
+
assigned to one or more nodes.
51
62
52
63
# [Azure portal](#tab/delete-azureportal)
53
64
54
65
You can delete configurations for both Windows and Linux nodes from the Azure portal.
55
66
56
-
1. Sign in to the [Azure portal](https://portal.azure.com).
67
+
1. Sign in to the [Azure portal][11].
57
68
1. Search for and select **Automation Accounts**.
58
69
1. On the **Automation Accounts** page, select your Automation account from the list.
59
-
1. From your Automation account, select **State configuration (DSC)** under **Configuration Management**.
60
-
1. On the **State configuration (DSC)** page, click the **Configurations** tab, then select the name of the configuration you want to delete.
70
+
1. From your Automation account, select **State configuration (DSC)** under **Configuration
71
+
Management**.
72
+
1. On the **State configuration (DSC)** page, select the **Configurations** tab, then select the name
73
+
of the configuration you want to delete.
61
74
62
75
:::image type="content" source="./media/remove-node-and-configuration-package/configurations-tab.png" alt-text="Screenshot of configurations tab." lightbox="./media/remove-node-and-configuration-package/configurations-tab.png":::
63
76
64
-
1. On the configuration's detail page, click**Delete** to remove the configuration.
77
+
1. On the configuration's detail page, select**Delete** to remove the configuration.
65
78
66
79
:::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":::
67
80
@@ -71,24 +84,31 @@ To manually delete the .mof configuration files, follow the steps:
71
84
72
85
**Delete a Windows configuration using PowerShell**
73
86
74
-
To remove an imported DSC configuration document (.mof), use the [Remove-DscConfigurationDocument](/powershell/module/psdesiredstateconfiguration/remove-dscconfigurationdocument) cmdlet.
87
+
To remove an imported DSC configuration document (.mof), use the
88
+
[Remove-DscConfigurationDocument][06] cmdlet.
75
89
76
90
**Delete a Linux configuration**
77
91
78
-
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.
92
+
To delete the node's configuration, remove the `.mof` configuration files stored in the
93
+
`/etc/opt/omi/conf/dsc/configuration/` directory.
79
94
80
95
81
96
---
82
97
83
98
## Re-register a node
84
-
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](../automation-dsc-onboarding.md)
99
+
100
+
You can re-register a node just as you registered the node initially, using any of the methods
101
+
described in [Enable Azure Automation State Configuration][02]
85
102
86
103
87
104
## Remove the DSC package from a Linux node
88
105
89
-
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.
106
+
This step is optional. Unregistering a Linux node from State Configuration (DSC) doesn't remove the
107
+
DSC and OMI packages from the machine. Use the following commands to remove the packages, all logs,
108
+
and related data.
90
109
91
-
To find the package names and other relevant details, see the [PowerShell Desired State Configuration for Linux](https://github.com/Microsoft/PowerShell-DSC-for-Linux) GitHub repository.
110
+
To find the package names and other relevant details, see the
111
+
[PowerShell Desired State Configuration for Linux][10] GitHub repository.
92
112
93
113
### RPM-based systems
94
114
@@ -104,6 +124,20 @@ dpkg -P <package name>
104
124
105
125
## Next steps
106
126
107
-
- If you want to re-register the node, or register a new one, see [Register a VM to be managed by State Configuration](../tutorial-configure-servers-desired-state.md#register-a-vm-to-be-managed-by-state-configuration).
108
-
109
-
- If you want to add the configuration back and recompile, see [Compile DSC configurations in Azure Automation State Configuration](../automation-dsc-compile.md).
127
+
- If you want to re-register the node, or register a new one, see
128
+
[Register a VM to be managed by State Configuration][03].
129
+
- If you want to add the configuration back and recompile, see
130
+
[Compile DSC configurations in Azure Automation State Configuration][01].
0 commit comments