-1

I'm trying to export an Azure ResourceGroup to a template-file using the following cmdlet (Windows 10 x64, module-version 2.0) but it throws an exception PS> Export-AzureRmResourceGroup -ResourceGroupName 'service-env-rg' -Path .\resourcegroup.json -ErrorAction SilentlyContinue Export-AzureRmResourceGroup : InternalServerError : Encountered internal server error. Diagnostic information: timestamp '20160809T072241Z', subscription id 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', tracking id 'eed95646-d845-4852-8971-a353bab65db2', request correlation id 'eed95646-d845-4852-8971-a353bab65db2'. At line:1 char:1 + Export-AzureRmResourceGroup -ResourceGroupName 'service-e ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Export-AzureRmResourceGroup], ErrorResponseMessageException + FullyQualifiedErrorId : InternalServerError,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ExportAzureResourceGroupCmdlet

If I run it without -ErrorAction I get a secondary exception as well with the pipeline being stopped. Anyone else seen this ? I got the same error with the previous version of the cmdlet.

juvchan
  • 6,113
  • 2
  • 22
  • 35

2 Answers2

0

I wonder if this is related to the fact that it appears the 'template export' functionality in the Azure portal is not really working properly either ... see this very recent forum thread:

https://social.msdn.microsoft.com/Forums/en-US/3200b7a1-768c-4714-a474-ac02df22e729/problem-with-exporting-current-state-arm-template-for-a-resource-group?forum=windowsazuremanagement

Cristian Satnic
  • 1,021
  • 8
  • 4
  • I have a work-account and a Microsoft-account with the same email-address and when using the portal previously it worked fine when I selected which account I'd use. But it appears that since the update in the portal from 'Export Template' to 'Automation Script' this also doesn't work. – Soren Albeck Aug 10 '16 at 06:04
0

After renaming my Microsoft-account it now works - both in Powershell and in the portal. Ie, it seems that an ARM update has introduced an authentication-change so that a login doesn't properly differentiate between accounts even though I select the type.