Can OMS agent for Linux be installed with powershell or via the portal?

1.3k views Asked by At

I need to re-install oms agent for a Linux machine, is there a way to do this via Azure power shell or via the portal?

1

There are 1 answers

1
Jayendran On

You can follow this steps

To remove the existing agent and then install the new agent, follow these steps:

  • Connect to the Linux computer, and then open a terminal session. To

    download the desired script, run the following command:

wget https://raw.githubusercontent.com/Microsoft/OMS-Agent-for-Linux/master/installer/scripts/onboard_agent.sh.

  • Run sudo sh onboard_agent.sh --purge. This downloads the most recent version of the installation script and runs the uninstall ation operation that will remove all existing agent components.
  • Remove the /etc/opt/microsoft/omsagent and /var/opt/microsoft/omsagent folders.
  • Run the following command: sudo sh onboard_agent.sh -w <workspaceid> -s <primarykey>

Notes

  • In this command, replace and with the appropriate values from the actual Azure workspace ID and primary key, respectively.

  • If you're using a cloud service other than Azure public cloud, you must add the -d parameter that identifies the domain that's to be used. For example, if you use the Azure US Government cloud, run the following command:

sudo sh onboard_agent.sh -w workspaceid -s primarykey -d opinsights.azure.us