Get-AzDataFactoryV2Pipeline : Unable to deserialize the response - azure

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.

Related

Azure Tag for Azure Depolyment not working

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

What does Object reference not set to an instance of an object error mean when using Add-AzServiceFabricClusterCertificate?

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'

Connect-AzureRmAccount - Cannot connect to Azure

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.

Azure - Unable to remove Log Analytics and solution

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!!

New-AzureRmResource : InternalServerError : Encountered an internal server error. while creating cloud service through Azure Powershell 5.0.0

Getting below error while creating cloud Service through Azure Powershell 5.0.0
And I am able to create cloud service though portal for the same input.
Does anybody have any idea. the same code was working perfectly fine last couple of months. but since couple of days i am seeing this error.
[DBG]: PS D:\MSTeams\Source\Repos\SkypeSpaces-Infra\tools\Azure>> New-AzureRmResource -Name $ServiceName -ResourceType "Microsoft.ClassicCompute/domainNames" -Location $Location.Location -ResourceGroupName $ResourceGroupName -Force:$Force -ErrorAction SilentlyContinue
New-AzureRmResource : InternalServerError : Encountered an internal server error. The tracking id is '862cb19d-4485-4ef8-a847-657beaeb7c90'.
At line:1 char:1
+ New-AzureRmResource -Name $ServiceName -ResourceType "Microsoft.Class ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureRmResource], ErrorResponseMessageException
+ FullyQualifiedErrorId : InternalServerError,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceCmdlet
Thanks in advance.

Resources