0
votes

I’m trying to delete a log analytics and a solution but I’m unable to do it using the portal because of errors. Already made sure that nothing is referencing the log analytics (exception is the solution).

Tried to do it using azure powershell but I’m getting some error and I don’t know what else I can do… We don't have a support plan where we can ask for technical help...

Sample of powershell script i tried:

Remove-AzureRmResource -ResourceId "/subscriptions/bb7a9927-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/uwe-azukw-rg-test-infrastructure/providers/microsoft.operationalinsights/workspaces/uwe-azuks-law-test-logAnalytics" -Force
Remove-AzureRmResource : Conflict : The workspace cannot be deleted because it's used by the following solution resources: /subscriptions/bb7a9927-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/uwe-azukw-rg-test-infrastructure/providers/microsoft.operationalinsights/workspaces/uwe-azuks-law-test-logAnalytics/views/LogicAppsManagement(uwe-azuks-law-test-logAnalytics)
At line:1 char:1
+ Remove-AzureRmResource -ResourceId "/subscriptions/bb7a9927-703e-4045 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Remove-AzureRmResource], ErrorResponseMessageException
    + FullyQualifiedErrorId : Conflict,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.RemoveAzureResourceCmdlet 

Anyone has any idea how can I delete this view? If I try I get the error below but not sure how can I change the values

PS C:\WINDOWS\system32> Remove-AzureRmResource -ResourceId "/subscriptions/bb7a9927-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/uwe-azukw-rg-test-infrastructure/providers/microsoft.operationalinsights/workspaces/uwe-azuks-law-test-logAnalytics/views/LogicAppsManagement(uwe-azuks-law-test-logAnalytics)" -Force
Remove-AzureRmResource : NoRegisteredProviderFound : No registered resource provider found for location 'uksouth' and API version '2015-01-01' for type 'workspaces'. The supported api-versions are 
'2015-03-20, 2015-11-01-preview, 2017-01-01-preview, 2017-03-03-preview, 2017-03-15-preview, 2017-04-26-preview'. The supported locations are 'eastus, westeurope, southeastasia, australiasoutheast, 
westcentralus, japaneast, uksouth, centralindia, canadacentral, westus2, australiacentral, australiaeast, francecentral, koreacentral, northeurope, centralus, eastasia, eastus2, southcentralus, 
northcentralus, westus'.
At line:1 char:1
+ Remove-AzureRmResource -ResourceId "/subscriptions/bb7a9927-XXXX-XXXX ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Remove-AzureRmResource], ErrorResponseMessageException
    + FullyQualifiedErrorId : NoRegisteredProviderFound,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.RemoveAzureResourceCmdlet 
1

1 Answers

0
votes

To remove a workspace I would suggest you to go with the cmdlet Remove-AzOperationalInsightsWorkspace / Remove-AzureRmOperationalInsightsWorkspace

To resolve 'NoRegisteredProviderFound' error, you may have to register the provider using cmdlet Register-AzResourceProvider / Register-AzureRmResourceProvider . For more details, please refer this tutorial.

Hope this helps!! Cheers!!