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
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!!
Related
I am trying to create a Azure deployment with Tag parameter to put tag on the deployment using command New-AzResourceGroupDeployment like -
New-AzResourceGroupDeployment -ResourceGroupName "demo" -TemplateFile "D:\Templates\storage.json" -Tag #{"CreatedFrom"="PS"; "Env"="Dev";}
but facing this issue -
New-AzResourceGroupDeployment : A parameter cannot be found that matches parameter name 'Tag'.
At line:1 char:102
+ ... Name "demo" -TemplateFile "D:\Templates\storage.json" -Tag #{"Crea ...
+ ~~~~
+ CategoryInfo : InvalidArgument: (:) [New-AzResourceGroupDeployment], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.N
ewAzureResourceGroupDeploymentCmdlet
According to the documentation we can put tag parameter with New-AzResourceGroupDeployment command but its not working for me.
Any help on what I am doing wrong here would be much appreciated!
The command works fine here. Make sure you have the latest version of the commands.
https://learn.microsoft.com/en-us/powershell/azure/new-azureps-module-az?view=azps-6.1.0
I am trying to fetch the Data Factory Pipeline Information with the help of following simple command:
Get-AzDataFactoryV2Pipeline -ResourceGroupName $resourceGroupName -DataFactoryName $dataFactoryName
However, I am getting this Error. I have also update my Az.Data Factory module to the latest one.
Get-AzDataFactoryV2Pipeline : Unable to deserialize the response.
At line:1 char:1
+ Get-AzDataFactoryV2Pipeline -ResourceGroupName $resourceGroupName -Da ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzDataFactoryV2Pipeline], SerializationException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.DataFactoryV2.GetAzureDataFactoryPipelineCommand
Please give your valuable suggestions to fix this ?
This command works for me with the Az.DataFactory 1.11.0, please open a new powershell session to try again.
I'm trying to add a new secondary cert to the service fabric, however I receive the following error. does any one have any pointers?
PS C:\WINDOWS\system32> Add-AzServiceFabricClusterCertificate -ResourceGroupName '******' -Name '********' -SecretIdentifier '*************'
Add-AzServiceFabricClusterCertificate : Object reference not set to an instance of an object.
At line:1 char:1
+ Add-AzServiceFabricClusterCertificate -ResourceGroupName '****
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Add-AzServiceFabricClusterCertificate], NullReferenceException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ServiceFabric.Commands.AddAzureRmServiceFabricClusterCertificate
I could not reproduce your issue, it works on my side.
Try to update the Az.ServiceFabric with the command below, my version is 2.0.1.
Update-Module -Name Az.ServiceFabric -Force
In azure keyvault, I use a self-signed certificate, make sure you use the SecretIdentifier below.
Then use the powershell and check the result in the portal.
Add-AzServiceFabricClusterCertificate -ResourceGroupName '<group-name>' -Name 'joyfabric' -SecretIdentifier 'https://joykeyvault.vault.azure.net/secrets/cer135/23c6706daeab47e59caca2431ad96a1c'
While trying to connect Azure from Powershell getting below error:
PS H:\> Connect-AzureRmAccount
Connect-AzureRmAccount : An error occurred while sending the request.
At line:1 char:1
+ Connect-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Connect-AzureRmAccount], HttpRequestException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
Couple of things to try :
Sometime , powershell cmdlet doesn't give proper error message as it suppressed it , to get the actual error you can try executing with -debug attribute or you can try using DebugPreference like below.
$DebugPreference = "Continue"
Write-Debug -Message "Hello, World"
Alternatively ,Connect-AzureRMAccount cmdlet used TLS 1.0 by default for connecting to azure and sometime it gets blocked by the organization security policy,
Can you setting up something like below:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Additional reference:
Connect-AzureRmAccount : accessing_ws_metadata_exchange_failed
Hope it helps.
I added a new Premium V2 app service plan. Now when running Get-AzureWebSite in PowerShell I'm getting the following error message:
get-azurewebsite : Requested value 'PremiumV2' was not found.
At line:1 char:1
+ get-azurewebsite
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureWebsite], ArgumentException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Websites.GetAzureWebsiteCommand
What is the error about?
The old CmdLets are no longer well supported, and don't know about new features like Premium V2.
Try using the ARM based CmdLets instead, like Get-AzureRmWebApp.