Skip to content

Commit c2a4803

Browse files
Merge pull request #232754 from SnehaSudhirG/30Mar-HRWNewDocUpdates
Edited the remove agent based HRW section - win/lin
2 parents 7519c63 + cbb9cdd commit c2a4803

File tree

3 files changed

+59
-37
lines changed

3 files changed

+59
-37
lines changed

articles/automation/automation-linux-hrw-install.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Deploy an agent-based Linux Hybrid Runbook Worker in Automation
33
description: This article tells how to install an agent-based Hybrid Runbook Worker to run runbooks on Linux-based machines in your local datacenter or cloud environment.
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 03/15/2023
6+
ms.date: 03/30/2023
77
ms.topic: conceptual
88
---
99

@@ -220,16 +220,26 @@ sudo python /opt/microsoft/omsconfig/modules/nxOMSAutomationWorker/DSCResources/
220220

221221
## <a name="remove-linux-hybrid-runbook-worker"></a>Remove the Hybrid Runbook Worker
222222

223-
You can use the command `ls /var/opt/microsoft/omsagent` on the Hybrid Runbook Worker to get the workspace ID. A folder is created that is named with the workspace ID.
223+
Run the following commands on agent-based Linux Hybrid Worker:
224224

225-
```bash
226-
sudo python onboarding.py --deregister --endpoint="<URL>" --key="<PrimaryAccessKey>" --groupname="Example" --workspaceid="<workspaceId>"
227-
```
225+
1. ```python
226+
sudo bash
227+
```
228+
229+
1. ```python
230+
rm -r /home/nxautomation
231+
```
232+
1. Under **Process Automation**, select **Hybrid worker groups** and then your hybrid worker group to go to the **Hybrid Worker Group** page.
233+
1. Under **Hybrid worker group**, select **Hybrid Workers**.
234+
1. Select the checkbox next to the machine(s) you want to delete from the hybrid worker group.
235+
1. Select **Delete** to remove the agent-based Linux Hybrid Worker.
236+
237+
238+
> [!NOTE]
239+
> - This script doesn't remove the Log Analytics agent for Linux from the machine. It only removes the functionality and configuration of the Hybrid Runbook Worker role.
240+
> - After you disable the Private Link in your Automation account, it might take up to 60 minutes to remove the Hybrid Runbook worker.
241+
> - After you remove the Hybrid Worker, the Hybrid Worker authentication certificate on the machine is valid for 45 minutes.
228242
229-
> [!NOTE]
230-
> - This script doesn't remove the Log Analytics agent for Linux from the machine. It only removes the functionality and configuration of the Hybrid Runbook Worker role. </br>
231-
> - After you disable the Private Link in your Automation account, it might take up to 60 minutes to remove the Hybrid Runbook worker.
232-
> - After you remove the Hybrid Worker, the Hybrid Worker authentication certificate on the machine is valid for 45 minutes.
233243

234244
## Remove a Hybrid Worker group
235245

articles/automation/automation-windows-hrw-install.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -246,18 +246,20 @@ Modules that are installed must be in a location referenced by the `PSModulePath
246246
247247
## <a name="remove-windows-hybrid-runbook-worker"></a>Remove the Hybrid Runbook Worker
248248
249-
1. In the Azure portal, go to your Automation account.
249+
1. Open PowerShell session in Administrator mode and run the following command:
250250
251-
1. Under **Account Settings**, select **Keys** and note the values for **URL** and **Primary Access Key**.
251+
```powershell-interactive
252+
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\HybridRunbookWorker\<AutomationAccountID>\<HybridWorkerGroupName>" -Force -Verbose
253+
```
254+
1. Under **Process Automation**, select **Hybrid worker groups** and then your hybrid worker group to go to the **Hybrid Worker Group** page.
255+
1. Under **Hybrid worker group**, select **Hybrid Workers**.
256+
1. Select the checkbox next to the machine(s) you want to delete from the hybrid worker group.
257+
1. Select **Delete** to remove the agent-based Windows Hybrid Worker.
252258
253-
1. Open a PowerShell session in Administrator mode and run the following command with your URL and primary access key values. Use the `Verbose` parameter for a detailed log of the removal process. To remove stale machines from your Hybrid Worker group, use the optional `machineName` parameter.
259+
> [!NOTE]
260+
> - After you disable the Private Link in your Automation account, it might take up to 60 minutes to remove the Hybrid Runbook worker.
261+
> - After you remove the Hybrid Worker, the Hybrid Worker authentication certificate on the machine is valid for 45 minutes.
254262
255-
```powershell-interactive
256-
Remove-HybridRunbookWorker -Url <URL> -Key <primaryAccessKey> -MachineName <computerName>
257-
```
258-
> [!NOTE]
259-
> - After you disable the Private Link in your Automation account, it might take up to 60 minutes to remove the Hybrid Runbook worker.
260-
> - After you remove the Hybrid Worker, the Hybrid Worker authentication certificate on the machine is valid for 45 minutes.
261263
262264
## Remove a Hybrid Worker group
263265

articles/automation/migrate-existing-agent-based-hybrid-worker-to-extension-based-workers.md

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Migrate an existing agent-based hybrid workers to extension-based-workers
33
description: This article provides information on how to migrate an existing agent-based hybrid worker to extension based workers.
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 03/15/2023
6+
ms.date: 03/30/2023
77
ms.topic: how-to
88
#Customer intent: As a developer, I want to learn about extension so that I can efficiently migrate agent based hybrid workers to extension based workers.
99
---
@@ -812,31 +812,41 @@ New-AzConnectedMachineExtension -ResourceGroupName <VMResourceGroupName> -Locati
812812

813813
#### [Windows Hybrid Worker](#tab/win-hrw)
814814

815-
1. In the Azure portal, go to your Automation account.
815+
1. Open PowerShell session in Administrator mode and run the following command:
816816

817-
1. Under **Account Settings**, select **Keys** and note the values for **URL** and **Primary Access Key**.
817+
```powershell-interactive
818+
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\HybridRunbookWorker\<AutomationAccountID>\<HybridWorkerGroupName>" -Force -Verbose
819+
```
820+
1. Under **Process Automation**, select **Hybrid worker groups** and then your hybrid worker group to go to the **Hybrid Worker Group** page.
821+
1. Under **Hybrid worker group**, select **Hybrid Workers**.
822+
1. Select the checkbox next to the machine(s) you want to delete from the hybrid worker group.
823+
1. Select **Delete** to remove the agent-based Windows Hybrid Worker.
818824

819-
1. Open a PowerShell session in Administrator mode and run the following command with your URL and primary access key values. Use the `Verbose` parameter for a detailed log of the removal process. To remove stale machines from your Hybrid Worker group, use the optional `machineName` parameter.
820-
821-
```powershell-interactive
822-
Remove-HybridRunbookWorker -Url <URL> -Key <primaryAccessKey> -MachineName <computerName>
823-
```
824-
> [!NOTE]
825-
> - After you disable the Private Link in your Automation account, it might take up to 60 minutes to remove the Hybrid Runbook worker.
826-
> - After you remove the Hybrid Worker, the Hybrid Worker authentication certificate on the machine is valid for 45 minutes.
825+
> [!NOTE]
826+
> - After you disable the Private Link in your Automation account, it might take up to 60 minutes to remove the Hybrid Runbook worker.
827+
> - After you remove the Hybrid Worker, the Hybrid Worker authentication certificate on the machine is valid for 45 minutes.
827828
828829
#### [Linux Hybrid Worker](#tab/lin-hrw)
829830

830-
You can use the command `ls /var/opt/microsoft/omsagent` on the Hybrid Runbook Worker to get the workspace ID. A folder is created that is named with the workspace ID.
831+
Run the following commands on agent-based Linux Hybrid Worker:
831832

832-
```bash
833-
sudo python onboarding.py --deregister --endpoint="<URL>" --key="<PrimaryAccessKey>" --groupname="Example" --workspaceid="<workspaceId>"
834-
```
833+
1. ```python
834+
sudo bash
835+
```
835836

836-
> [!NOTE]
837-
> - This script doesn't remove the Log Analytics agent for Linux from the machine. It only removes the functionality and configuration of the Hybrid Runbook Worker role. </br>
838-
> - After you disable the Private Link in your Automation account, it might take up to 60 minutes to remove the Hybrid Runbook worker.
839-
> - After you remove the Hybrid Worker, the Hybrid Worker authentication certificate on the machine is valid for 45 minutes.
837+
1. ```python
838+
rm -r /home/nxautomation
839+
```
840+
1. Under **Process Automation**, select **Hybrid worker groups** and then your hybrid worker group to go to the **Hybrid Worker Group** page.
841+
1. Under **Hybrid worker group**, select **Hybrid Workers**.
842+
1. Select the checkbox next to the machine(s) you want to delete from the hybrid worker group.
843+
1. Select **Delete** to remove the agent-based Linux Hybrid Worker.
844+
845+
846+
> [!NOTE]
847+
> - This script doesn't remove the Log Analytics agent for Linux from the machine. It only removes the functionality and configuration of the Hybrid Runbook Worker role. </br>
848+
> - After you disable the Private Link in your Automation account, it might take up to 60 minutes to remove the Hybrid Runbook worker.
849+
> - After you remove the Hybrid Worker, the Hybrid Worker authentication certificate on the machine is valid for 45 minutes.
840850
841851
---
842852

0 commit comments

Comments
 (0)