Skip to content

Commit 00b65eb

Browse files
authored
Update Unregister-AzAutomationDscNode.md (#23986)
Add Example on how to unregister a node from an Azure Automation account by specifying the node name
1 parent a57f1a8 commit 00b65eb

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/Automation/Automation/help/Unregister-AzAutomationDscNode.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ Unregister-AzAutomationDscNode -AutomationAccountName "Contoso17" -ResourceGroup
3131

3232
This command removes the DSC node that has the specified GUID from management by the Automation account named Contoso17.
3333

34+
### Example 2: Remove an Azure DSC node from management by an Automation account by specifying the DSC node name
35+
36+
```powershell
37+
$dscNodeNameToRemove = "MyMachine1"
38+
$automationAccountName = "Contoso17"
39+
$resourceGroupName = "ResourceGroup01"
40+
$nodeToRemove = Get-AzAutomationDscNode -Name $dscNodeNameToRemove -AutomationAccountName $automationAccountName -ResourceGroupName $resourceGroupName
41+
$nodeToRemove | Unregister-AzAutomationDscNode -AutomationAccountName $automationAccountName -ResourceGroupName $resourceGroupName
42+
```
43+
44+
This command removes the DSC node that has the name "MyMachine1" from management by the Automation account named Contoso17.
45+
3446
## PARAMETERS
3547

3648
### -AutomationAccountName
@@ -161,5 +173,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
161173
[Register-AzAutomationDscNode](./Register-AzAutomationDscNode.md)
162174
163175
[Set-AzAutomationDscNode](./Set-AzAutomationDscNode.md)
164-
165-

0 commit comments

Comments
 (0)