Skip to content

[Bug]: Issues with ThreadJob module when running in Automation mode #382

@arthurabreu1

Description

@arthurabreu1

Describe the bug
When running ARI in Automation mode, it fails when running dependencies from the ThreadJob module, even though it has been successfully added to the runtime environment.
The output csv file is saved to the storage account but contains no data.

To Reproduce
Script executed by my runbook:
Import-Module AzureResourceInventory
Invoke-ARI -TenantID -SubscriptionID -Automation -StorageAccount saari -StorageContainer ari -IncludeCosts -SkipDiagram -SkipPolicy -SkipVMDetails -SkipAdvisory

Also tried Importing the Thread-Job module manually (Import-Module ThreadJob) before calling Invoke-ARI to no avail.
Executing the same command from VSCode (without the Automation and StorageAccount switches) runs just fine and I can get all the contents I need on the CSV file.

Expected behavior
No output errors and CSV file containing data written to the container on my storage account.

Screenshots

Image Image Image

Environment
Runtime Environment Powershell 7.4

Azure cloud special setting
None

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions