Hi there,
Did you try Poweshell?
https://learn.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-optout-hybrid#using-powershell
Using Bash?
https://learn.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-optout-hybrid#using-bash
Anyway, I would recommend to check thit KB https://learn.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-optout-hybrid