MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.28k stars 21.45k forks source link

\LogAnalyticsAgentUninstallUtilityScript.ps1 log analytics removal tool errors out #124301

Open xantari opened 2 months ago

xantari commented 2 months ago

The script in this doc doesn't work.

https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/azure-monitor/agents/azure-monitor-agent-mma-removal-tool.md

When run you get this:


PowerShell transcript start Start time: 20240831081503 Username: WEB1\IntranetAdmin RunAs User: WEB1\IntranetAdmin Configuration Name: Machine: WEB1 (Microsoft Windows NT 10.0.17763.0) Host Application: C:\Program Files\PowerShell\7\pwsh.dll Process ID: 3520 PSVersion: 7.4.5 PSEdition: Core GitCommitId: 7.4.5 OS: Microsoft Windows 10.0.17763 Platform: Win32NT PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1, 6.0, 7.0 PSRemotingProtocolVersion: 2.3 SerializationVersion: 1.1.0.1 WSManStackVersion: 3.0


Transcript started, output file is LogAnalyticsAgentUninstallUtilityScriptLog.log Detected 1 Vm's in this subscription. Detected 0 Vmss in this subscription. PS>TerminatingError(ConvertFrom-Json): "Conversion from JSON failed with error: Unexpected character encountered while parsing value: T. Path '', line 0, position 0." ConvertFrom-Json: F:\PowershellScripts\LogAnalyticsAgentUninstallUtilityScript.ps1:26 Line | 26 | … id, ResourceGroup:resourceGroup, ServerName:name}" | ConvertFrom-Json | ~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: T. Path '', line 0, position 0. ConvertFrom-Json: F:\PowershellScripts\LogAnalyticsAgentUninstallUtilityScript.ps1:26 Line | 26 | … id, ResourceGroup:resourceGroup, ServerName:name}" | ConvertFrom-Json | ~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: T. Path '', line | 0, position 0.

Cannot get the Arc server list


PowerShell transcript end End time: 20240831082828



PowerShell transcript start Start time: 20240831082839 Username: WEB1\IntranetAdmin RunAs User: WEB1\IntranetAdmin Configuration Name: Machine: WEB1 (Microsoft Windows NT 10.0.17763.0) Host Application: C:\Program Files\PowerShell\7\pwsh.dll Process ID: 3520 PSVersion: 7.4.5 PSEdition: Core GitCommitId: 7.4.5 OS: Microsoft Windows 10.0.17763 Platform: Win32NT PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1, 6.0, 7.0 PSRemotingProtocolVersion: 2.3 SerializationVersion: 1.1.0.1 WSManStackVersion: 3.0


Transcript started, output file is LogAnalyticsAgentUninstallUtilityScriptLog.log Detected 1 Vm's in this subscription. Detected 0 Vmss in this subscription. Cannot get the Arc server list


PowerShell transcript end End time: 20240831082851


TPavanBalaji commented 2 months ago

@xantari Thanks for your feedback! We will investigate and update as appropriate.

mcohan-omnicell commented 2 months ago

Is there an update on this?

ManoharLakkoju-MSFT commented 1 month ago

@mcohan-omnicell Thank you for bringing this to our attention. I've delegated this to content author @guywi-ms, who will review it and offer their insightful opinions.