Skip to content

Commit 8a9540d

Browse files
authored
Merge pull request #183806 from SGSneha/29Dec-DSC
restructured unregister node
2 parents d1e4764 + 00dd220 commit 8a9540d

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

articles/automation/state-configuration/remove-node-and-configuration-package.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ ms.topic: how-to
1010

1111
# How to remove a configuration and node from Automation State Configuration
1212

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).
1414

1515
## Unregister a node
1616

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).
1819
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.
2021

21-
### Unregister in the Azure portal
22+
# [Azure portal](#tab/azureportal)
2223

2324
1. Sign in to the [Azure portal](https://portal.azure.com).
2425
1. Search for and select **Automation Accounts**.
@@ -30,18 +31,21 @@ Unregistering a node from the service only sets the Local Configuration Manager
3031

3132
:::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":::
3233

33-
### Unregister using PowerShell
34+
# [Azure PowerShell](#tab/powershell)
3435

3536
You can also unregister a node using the PowerShell cmdlet [Unregister-AzAutomationDscNode](/powershell/module/az.automation/unregister-azautomationdscnode).
3637

3738
>[!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+
3943

40-
## Delete a configuration
44+
## Delete a configuration from the node
4145

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.
4347

44-
### Delete a configuration from the Azure portal
48+
# [Azure portal](#tab/delete-azureportal)
4549

4650
You can delete configurations for both Windows and Linux nodes from the Azure portal.
4751

@@ -57,18 +61,25 @@ You can delete configurations for both Windows and Linux nodes from the Azure po
5761

5862
:::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":::
5963

60-
## Manually delete a configuration file from a node
64+
# [Manual Deletion](#tab/manual-delete-azureportal)
6165

62-
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:
6367

64-
### Delete a Windows configuration using PowerShell
68+
**Delete a Windows configuration using PowerShell**
6569

6670
To remove an imported DSC configuration document (.mof), use the [Remove-DscConfigurationDocument](/powershell/module/psdesiredstateconfiguration/remove-dscconfigurationdocument) cmdlet.
6771

68-
### Delete a Linux configuration
72+
**Delete a Linux configuration**
6973

7074
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.
7175

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+
7283
## Remove the DSC package from a Linux node
7384

7485
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

Comments
 (0)