Skip to content

Az.Resources v6.6.1 fails to import to Azure Automation Account with PowerShell v5.1 #21647

Open
@o-l-a-v

Description

@o-l-a-v

Edit 2025-02-23:


Edit 2024-01-03:


Description

Tried three times to import Az.Resources v6.6.1 to an Azure Automation Account, but it fails.

I imported/updated Az.Accounts to v2.12.2 prior to this.

This is using the built in "Browse gallery" method.

image

Issue script & Debug output

None.

Environment data

5.1 in Azure Automation Account

Module versions

Az.Accounts v2.12.2
Az.Resources v6.6.1

Error output

Error importing the module Az.Resources. Import failed with the following error: Orchestrator.Shared.AsyncModuleImport.ModuleImportException: An error occurred when trying to import the module to an internal PowerShell session. Either the module dependencies are not imported correctly or the module is unsupported. Internal Error Message: The type initializer for 'Microsoft.Azure.Commands.Common.AzModule' threw an exception. The type initializer for 'Microsoft.Azure.Commands.Common.AzModule' threw an exception. . at Orchestrator.Activities.SetModuleVersion.GetPsModuleVersion(String moduleName, String moduleFullPath, Guid accountId, Guid moduleVersionId, InitialSessionState defaultSessionState) at Orchestrator.Activities.SetModuleVersion.InsertModuleVersion(String moduleName, ModuleLanguage moduleLanguage, String pythonModuleVersion, String moduleFullyQualifiedName, ActivitiesMetadataWorkflowExtension activitiesMetadataWorkflowExtension, Guid accountId, Guid moduleVersionId, Int64 moduleContentByteSize, ContentUriInfo contentUri, String storageUri, Int32 moduleVersion) at Orchestrator.Activities.SetModuleVersion.ExecuteInternal(CodeActivityContext context, String moduleName, ModuleLanguage moduleLanguage, String pythonModuleVersion, String modulePath, Guid accountId, Guid moduleVersionId, Int64 moduleContentByteSize, String storageUri, Int32 moduleVersion) at Orchestrator.Activities.SetModuleVersion.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Metadata

Metadata

Assignees

Labels

ADOIssue is documented on MSFT ADO for internal trackingTrackingWe will track status and follow internallybugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reported

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions