microsoft / ARI

Azure Resource Inventory - It's a Powerful tool to create EXCEL inventory from Azure Resources with low effort
MIT License
1.08k stars 392 forks source link

AppGw #200

Closed tosser23 closed 2 months ago

tosser23 commented 3 months ago

Hello Claudio,

fantastic job, very helpful script. I have an issue with AppGw. The script does not seem to be able to detect them even though runing in debug mode the script AppGw.ps1 is actually invoked. Can you please advise? Thank you in advance giuseppe

Claudio-Merola commented 3 months ago

Hello @tosser23

I have tested the script and App Gateways were reported correctly in my environment.

How many App Gateways do you have in the environment? They are v1 or v2?

Can you try the latest version of the script? Just to be sure

tosser23 commented 3 months ago

Hello Claudio,

SKU_size WAF_v2 SKU family Generation2

yeap I'm running the latest version with the -Online option with a user with Reader access on all subscription of the Tenants

I'm puzzled Thank you for your help giuseppe

Claudio-Merola commented 2 months ago

Hi @tosser23

Can you try the version 3.1.31?

If it does not work, paste the -Debug output here please

tosser23 commented 2 months ago

Hello,

I am even more puzzled. On a small lab Tenant with one subscription the 3.1.31 actually worked showing the only AppGw I have, but when I run it against the customer environment....nothing and instead of having roughly 8100 resources now I have only 1600ish detected resources. What I did is: downloading the newest version from git hub unzipit open a Powershell and run it. My user is contributor on 8 subscriptions in that tenant... Anyhow as requested I past the debub printout THANKS!!!!

PS I am using the latest az version because for a known issue with 2.6.1 wasn't asking me for the login anylonger

PS C:\inventory\ARI-main> .\AzureResourceInventory.ps1 -Includetags -SkipDiagram -Debug DEBUG: 2024-07-05_18_28_18 - Debbuging Mode: On. ErrorActionPreference was set to "Continue", every error will be presented. DEBUG: 2024-07-05_18_28_18 - Cleaning default variables DEBUG: 2024-07-05_18_28_18 - Checking if -Online parameter will have to be forced. DEBUG: 2024-07-05_18_28_18 - Starting Extractor function DEBUG: 2024-07-05_18_28_18 - Powershell Edition: Desktop DEBUG: 2024-07-05_18_28_18 - Powershell Version: 5.1.17763.5933 DEBUG: 2024-07-05_18_28_18 - Starting checkAzCli function Validating Az Cli.. WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade' DEBUG: 2024-07-05_18_28_32 - Current az cli version: azure-cli 2.56.0 * Validating Az Cli Extension.. DEBUG: 2024-07-05_18_28_33 - Current Resource-Graph Extension Version: 2.1.0 Validating ImportExcel Module.. DEBUG: 2024-07-05_18_28_37 - ImportExcel Module Version: 7.8.6 DEBUG: 2024-07-05_18_28_38 - Starting checkPS function PowerShell Desktop Identified.

DEBUG: 2024-07-05_18_28_38 - Starting LoginSession function Azure Cloud Environment: AzureCloud Tenant ID not specified. Use -TenantID parameter if you want to specify directly. Authenticating Azure

DEBUG: 2024-07-05_18_28_38 - Cleaning az account cache DEBUG: 2024-07-05_18_28_40 - Calling az login

DEBUG: 2024-07-05_18_29_13 - Checking number of Tenants You have privileges only in One Tenant

Extracting from Tenant fe54621c-7345-42de-b5bd-0fb1931f8a6f DEBUG: 2024-07-05_18_29_13 - Extracting Subscription details DEBUG: 2024-07-05_18_29_14 - Tags will be included DEBUG: 2024-07-05_18_29_14 - Number of Subscriptions Found: 8 DEBUG: 2024-07-05_18_29_14 - Checking report folder: C:\AzureResourceInventory\ DEBUG: 2024-07-05_18_29_14 - Invoking Inventory Loop for Resources DEBUG: 2024-07-05_18_29_22 - Invoking Inventory Loop for Network Resources DEBUG: 2024-07-05_18_29_29 - Invoking Inventory Loop for Backup Resources DEBUG: 2024-07-05_18_29_37 - Invoking Inventory Loop for AVD Resources DEBUG: 2024-07-05_18_29_43 - Invoking Inventory Loop for Resource Containers DEBUG: 2024-07-05_18_29_50 - Invoking Inventory Loop for Policies Resources DEBUG: 2024-07-05_18_29_57 - Invoking Inventory Loop for Advisories DEBUG: 2024-07-05_18_30_05 - Excel file:C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-05_18_30.xlsx DEBUG: 2024-07-05_18_30_05 - Excel Table Style used: Light19 DEBUG: 2024-07-05_18_30_05 - Importing List of Unsupported Versions. DEBUG: 2024-07-05_18_30_05 - Looking for the following file: C:\inventory\ARI-main\Extras\Support.json DEBUG: 2024-07-05_18_30_05 - Checking if Draw.io Diagram Job Should be Run. DEBUG: 2024-07-05_18_30_05 - Checking If Should Run Security Center Job. DEBUG: 2024-07-05_18_30_05 - Checking If Should Run Policy Job. DEBUG: 2024-07-05_18_30_05 - Starting Policy Processing Job. DEBUG: 2024-07-05_18_30_06 - Checking If Should Run Advisory Job. DEBUG: 2024-07-05_18_30_06 - Starting Advisory Processing Job. DEBUG: 2024-07-05_18_30_06 - Starting Subscriptions job. DEBUG: 2024-07-05_18_30_06 - Starting Processing Jobs in Medium Mode. DEBUG: 2024-07-05_18_30_06 - Total Resources Being Processed: 1641 DEBUG: 2024-07-05_18_30_06 - Resources Being Processed in ResourceJob_1: 1640 DEBUG: 2024-07-05_18_30_07 - Starting Jobs Collector. DEBUG: 2024-07-05_18_30_07 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_10 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_13 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_16 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_19 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_22 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_25 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_28 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_31 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_34 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_37 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_40 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_43 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_46 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_49 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_52 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_55 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_30_59 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_02 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_05 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_08 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_11 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_14 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_17 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_20 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_23 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_26 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_29 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_32 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_35 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_38 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_41 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_44 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_47 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_50 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_53 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_56 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_31_59 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_32_02 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_32_05 - Jobs Still Running: 1 DEBUG: 2024-07-05_18_32_08 - Jobs Compleated. DEBUG: 2024-07-05_18_32_08 - Job ResourceJob_1 Returned: 26 Resource Types. DEBUG: 2024-07-05_18_32_08 - Starting Reporting Phase. DEBUG: 2024-07-05_18_32_08 - Running Offline, Gathering List Of Modules. DEBUG: 2024-07-05_18_32_08 - Modules Found: 78 DEBUG: 2024-07-05_18_32_10 - Running Module: 'WrkSpace'. Resources Count: 7 DEBUG: 2024-07-05_18_32_14 - Running Module: 'APPSERVICEPLAN'. Resources Count: 5 DEBUG: 2024-07-05_18_32_15 - Running Module: 'APPSERVICES'. Resources Count: 32 DEBUG: 2024-07-05_18_32_16 - Running Module: 'AVD'. Resources Count: 2 DEBUG: 2024-07-05_18_32_17 - Running Module: 'VM'. Resources Count: 415 DEBUG: 2024-07-05_18_32_20 - Running Module: 'SQLDB'. Resources Count: 1 DEBUG: 2024-07-05_18_32_21 - Running Module: 'SQLSERVER'. Resources Count: 1 DEBUG: 2024-07-05_18_32_22 - Running Module: 'SQLVM'. Resources Count: 14 DEBUG: 2024-07-05_18_32_23 - Running Module: 'AutomationAcc'. Resources Count: 30 DEBUG: 2024-07-05_18_32_24 - Running Module: 'AvSet'. Resources Count: 21 DEBUG: 2024-07-05_18_32_25 - Running Module: 'BASTION'. Resources Count: 2 DEBUG: 2024-07-05_18_32_26 - Running Module: 'RecoveryVault'. Resources Count: 2 DEBUG: 2024-07-05_18_32_27 - Running Module: 'AppInsights'. Resources Count: 10 DEBUG: 2024-07-05_18_32_28 - Running Module: 'Backup'. Resources Count: 95 DEBUG: 2024-07-05_18_32_30 - Running Module: 'Connections'. Resources Count: 2 DEBUG: 2024-07-05_18_32_31 - Running Module: 'LoadBalancer'. Resources Count: 4 DEBUG: 2024-07-05_18_32_32 - Running Module: 'NetworkInterface'. Resources Count: 74 DEBUG: 2024-07-05_18_32_33 - Running Module: 'NetworkSecurityGroup'. Resources Count: 77 DEBUG: 2024-07-05_18_32_34 - Running Module: 'PrivateDNS'. Resources Count: 1 DEBUG: 2024-07-05_18_32_35 - Running Module: 'PublicIP'. Resources Count: 19 DEBUG: 2024-07-05_18_32_37 - Running Module: 'ROUTETABLE'. Resources Count: 3 DEBUG: 2024-07-05_18_32_38 - Running Module: 'VirtualNetwork'. Resources Count: 19 DEBUG: 2024-07-05_18_32_39 - Running Module: 'VNETGTW'. Resources Count: 2 DEBUG: 2024-07-05_18_32_40 - Running Module: 'vNETPeering'. Resources Count: 12 DEBUG: 2024-07-05_18_32_41 - Running Module: 'StorageAcc'. Resources Count: 64 DEBUG: 2024-07-05_18_32_43 - Running Module: 'VMDisk'. Resources Count: 329 DEBUG: 2024-07-05_18_32_44 - Resource Reporting Phase Done. DEBUG: 2024-07-05_18_32_44 - Checking if Should Generate Security Center Sheet. DEBUG: 2024-07-05_18_32_44 - Checking if Should Generate Policy Sheet. DEBUG: 2024-07-05_18_32_44 - Generating Policy Sheet. DEBUG: 2024-07-05_18_32_44 - Looking for the following file: C:\inventory\ARI-main\Extras\Policy.ps1 DEBUG: 2024-07-05_18_32_45 - Checking if Should Generate Advisory Sheet. DEBUG: 2024-07-05_18_32_45 - Generating Advisor Sheet. DEBUG: 2024-07-05_18_32_45 - Looking for the following file: C:\inventory\ARI-main\Extras\Advisory.ps1 DEBUG: 2024-07-05_18_32_46 - Generating Subscription sheet for: 8 Subscriptions. DEBUG: 2024-07-05_18_32_46 - Looking for the following file: C:\inventory\ARI-main\Extras\Subscriptions.ps1 DEBUG: 2024-07-05_18_32_47 - Generating Overview sheet (Charts). DEBUG: 2024-07-05_18_32_47 - Looking for the following file: C:\inventory\ARI-main\Extras\Charts.ps1 DEBUG: 2024-07-05_18_32_53 - Finished Charts Phase. Report Complete. Total Runtime was: 4.57 Minutes Total Resources: 1641 Total Advisories: 1000 Total Policies: 21

Excel file saved at: C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-05_18_30.xlsx

Claudio-Merola commented 2 months ago

Hi @tosser23

Apparently there is something wrong with the capture of resources, during the extraction phase of the script.

You can use the AZ CLI version 2.61, we set the script to disable WAM during the authentication phase and re-enable after authenticating, so it should work fine with that version.

Also, can you try to run the script on PowerShell Core?

https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4

Even we made the script capable of running on Windows Powershell, most tests were done using PowerShell Core

tosser23 commented 2 months ago

Hello Claudio,

Really puzzled. First of all I cannot use 2.61, it simply does not work but never mind I use 2.59. I put myself in your lab situation (nearly) Windows 11 22H2 Powershell | 5.1.22621.3672 ImportExcel | 7.8 "azure-cli": "2.59.0", "azure-cli-core": "2.59.0", "azure-cli-telemetry": "1.1.0", "extensions": { "account": "0.2.5", "resource-graph": "2.1.0"

Then I installed PowerShellCore downloaded the zip file with script in it unblock the AzureResourceInventory.ps1 and launch .\AzureResourceInventory.ps1 -IncludeTags -SkipDiagram.

On customer A with a read only user I get a spot on result!!!! On customer B in which I am Contributor I get a variety of results: now with the latest version of the script I get 1641 resources whereas they were 8327 with the old version.....

Puzzled Thank you for your help giuseppe

Claudio-Merola commented 2 months ago

Hi @tosser23

I found a bug in the Resource Extraction part of the script.

Can you try the version 3.1.33 and see how it goes now?

tosser23 commented 2 months ago

ERROR: {ventory [3% Complete. ] "code": "BadRequest", "message": "Please provide below info when asking for support: timestamp = 2024-07-08T14:46:24.8926214Z, correlationId = 72e4b1cc-c82d-487f-b5a0-a9d4b6ebf1f5.", "details": [ { "code": "CouldNotDecodeSkipToken", "message": "Skip token could not be decoded." } ] } ERROR: { "code": "BadRequest", "message": "Please provide below info when asking for support: timestamp = 2024-07-08T14:46:26.6432948Z, correlationId = c13a6939-5f4d-45a1-a57e-0fd589d0e291.", "details": [ { "code": "CouldNotDecodeSkipToken", "message": "Skip token could not be decoded." } ] } ERROR: { "code": "BadRequest", "message": "Please provide below info when asking for support: timestamp = 2024-07-08T14:46:28.3132108Z, correlationId = 6fc5a210-f7c1-4ab2-b558-54d61ca2048f.", "details": [ {

I am always more convince that is a problem of my user

premalad commented 2 months ago

i even get similar error as tosser23 with version 3.1.33 code": "BadRequest", "message": "Please provide below info when asking for support: timestamp = 2024-07-09T14:35:46.3009573Z, correlationId = ", "details": [ { "code": "CouldNotDecodeSkipToken", "message": "Skip token could not be decoded." } ] }

Claudio-Merola commented 2 months ago

Hello @tosser23 and @premalad

It was a bug at version 3.1.33, can you guys try the version 3.1.34 and see how it goes?

tosser23 commented 2 months ago

PS C:\3.1.34\ARI-main> .\AzureResourceInventory.ps1 -Debug -IncludeTags -SkipDiagram DEBUG: 2024-07-10_16_42_50 - Debbuging Mode: On. ErrorActionPreference was set to "Continue", every error will be presented. DEBUG: 2024-07-10_16_42_50 - Cleaning default variables DEBUG: 2024-07-10_16_42_50 - Checking if -Online parameter will have to be forced. DEBUG: 2024-07-10_16_42_50 - Starting Extractor function DEBUG: 2024-07-10_16_42_50 - Powershell Edition: Core DEBUG: 2024-07-10_16_42_50 - Powershell Version: 7.4.3 DEBUG: 2024-07-10_16_42_50 - Starting checkAzCli function Validating Az Cli.. WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade' DEBUG: 2024-07-10_16_42_52 - Current az cli version: azure-cli 2.59.0 * Validating Az Cli Extension.. DEBUG: 2024-07-10_16_42_53 - Current Resource-Graph Extension Version: 2.1.0 Validating ImportExcel Module.. DEBUG: 2024-07-10_16_42_53 - ImportExcel Module Version: .. DEBUG: 2024-07-10_16_42_53 - Starting checkPS function PowerShell Desktop Identified.

DEBUG: 2024-07-10_16_42_53 - Starting LoginSession function Azure Cloud Environment: AzureCloud Tenant ID not specified. Use -TenantID parameter if you want to specify directly. Authenticating Azure

DEBUG: 2024-07-10_16_42_54 - Cleaning az account cache DEBUG: 2024-07-10_16_42_55 - Calling az login

DEBUG: 2024-07-10_16_43_04 - Checking number of Tenants You have privileges only in One Tenant

Extracting from Tenant fe54621c-7345-42de-b5bd-0fb1931f8a6f DEBUG: 2024-07-10_16_43_04 - Extracting Subscription details DEBUG: 2024-07-10_16_43_05 - Tags will be included DEBUG: 2024-07-10_16_43_05 - Number of Subscriptions Found: 8 DEBUG: 2024-07-10_16_43_05 - Checking report folder: C:\AzureResourceInventory\ DEBUG: 2024-07-10_16_43_05 - Invoking Inventory Loop for Resources ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. DEBUG: 2024-07-10_16_43_31 - Invoking Inventory Loop for Network Resources DEBUG: 2024-07-10_16_43_33 - Invoking Inventory Loop for Backup Resources DEBUG: 2024-07-10_16_43_36 - Invoking Inventory Loop for AVD Resources DEBUG: 2024-07-10_16_43_38 - Invoking Inventory Loop for Resource Containers DEBUG: 2024-07-10_16_43_40 - Invoking Inventory Loop for Policies Resources DEBUG: 2024-07-10_16_43_41 - Invoking Inventory Loop for Advisories ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. DEBUG: 2024-07-10_16_44_04 - Excel file:C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-10_16_44.xlsx DEBUG: 2024-07-10_16_44_04 - Excel Table Style used: Light19 DEBUG: 2024-07-10_16_44_04 - Importing List of Unsupported Versions. DEBUG: 2024-07-10_16_44_04 - Looking for the following file: C:\3.1.34\ARI-main\Extras\Support.json DEBUG: 2024-07-10_16_44_04 - Checking if Draw.io Diagram Job Should be Run. DEBUG: 2024-07-10_16_44_04 - Checking If Should Run Security Center Job. DEBUG: 2024-07-10_16_44_04 - Checking If Should Run Policy Job. DEBUG: 2024-07-10_16_44_04 - Starting Policy Processing Job. DEBUG: 2024-07-10_16_44_04 - Checking If Should Run Advisory Job. DEBUG: 2024-07-10_16_44_04 - Starting Advisory Processing Job. DEBUG: 2024-07-10_16_44_04 - Starting Subscriptions job. DEBUG: 2024-07-10_16_44_05 - Starting Processing Jobs in Medium Mode. DEBUG: 2024-07-10_16_44_05 - Total Resources Being Processed: 7848 DEBUG: 2024-07-10_16_44_05 - Resources Being Processed in ResourceJob_1: 5000 DEBUG: 2024-07-10_16_44_07 - Resources Being Processed in ResourceJob_2: 2847 DEBUG: 2024-07-10_16_44_10 - Starting Jobs Collector. DEBUG: 2024-07-10_16_44_10 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_44_15 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_44_21 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_44_26 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_44_31 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_44_36 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_44_41 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_44_46 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_44_53 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_44_59 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_04 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_09 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_14 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_19 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_24 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_29 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_34 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_39 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_44 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_49 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_54 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_45_59 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_46_04 - Jobs Still Running: 2 DEBUG: 2024-07-10_16_46_09 - Jobs Still Running: 1 DEBUG: 2024-07-10_16_46_14 - Jobs Compleated. DEBUG: 2024-07-10_16_46_14 - Job ResourceJob_1 Returned: 43 Resource Types. DEBUG: 2024-07-10_16_46_14 - Job ResourceJob_2 Returned: 39 Resource Types. DEBUG: 2024-07-10_16_46_14 - Starting Reporting Phase. DEBUG: 2024-07-10_16_46_14 - Running Offline, Gathering List Of Modules. DEBUG: 2024-07-10_16_46_14 - Modules Found: 78 DEBUG: 2024-07-10_16_46_19 - Resource Reporting Phase Done. DEBUG: 2024-07-10_16_46_19 - Checking if Should Generate Security Center Sheet. DEBUG: 2024-07-10_16_46_19 - Checking if Should Generate Policy Sheet. DEBUG: 2024-07-10_16_46_19 - Generating Policy Sheet. DEBUG: 2024-07-10_16_46_19 - Looking for the following file: C:\3.1.34\ARI-main\Extras\Policy.ps1 DEBUG: 2024-07-10_16_46_20 - Checking if Should Generate Advisory Sheet. DEBUG: 2024-07-10_16_46_20 - Generating Advisor Sheet. DEBUG: 2024-07-10_16_46_20 - Looking for the following file: C:\3.1.34\ARI-main\Extras\Advisory.ps1 DEBUG: 2024-07-10_16_46_23 - Generating Subscription sheet for: 8 Subscriptions. DEBUG: 2024-07-10_16_46_23 - Looking for the following file: C:\3.1.34\ARI-main\Extras\Subscriptions.ps1 DEBUG: 2024-07-10_16_46_25 - Generating Overview sheet (Charts). DEBUG: 2024-07-10_16_46_25 - Looking for the following file: C:\3.1.34\ARI-main\Extras\Charts.ps1 DEBUG: 2024-07-10_16_46_31 - Finished Charts Phase. Report Complete. Total Runtime was: 3.69 Minutes Total Resources: 7848 Total Advisories: 6608 Total Policies: 21

Excel file saved at: C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-10_16_44.xlsx

The xls file is not correctly formatted.

Thank you for your precious support giuseppe

Claudio-Merola commented 2 months ago

@tosser23,

Ok, I see we fixed the number of resources issue. Less one...

If you run the script without the "-IncludeTags" the error still occurs?

tosser23 commented 2 months ago

PS C:\3.1.34\ARI-main> .\AzureResourceInventory.ps1 -Debug -SkipDiagram DEBUG: 2024-07-10_23_34_03 - Debbuging Mode: On. ErrorActionPreference was set to "Continue", every error will be presented. DEBUG: 2024-07-10_23_34_03 - Cleaning default variables DEBUG: 2024-07-10_23_34_03 - Checking if -Online parameter will have to be forced. DEBUG: 2024-07-10_23_34_03 - Starting Extractor function DEBUG: 2024-07-10_23_34_03 - Powershell Edition: Core DEBUG: 2024-07-10_23_34_03 - Powershell Version: 7.4.3 DEBUG: 2024-07-10_23_34_03 - Starting checkAzCli function Validating Az Cli.. WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade' DEBUG: 2024-07-10_23_34_06 - Current az cli version: azure-cli 2.59.0 * Validating Az Cli Extension.. DEBUG: 2024-07-10_23_34_06 - Current Resource-Graph Extension Version: 2.1.0 Validating ImportExcel Module.. DEBUG: 2024-07-10_23_34_07 - ImportExcel Module Version: .. DEBUG: 2024-07-10_23_34_07 - Starting checkPS function PowerShell Desktop Identified.

DEBUG: 2024-07-10_23_34_07 - Starting LoginSession function Azure Cloud Environment: AzureCloud Tenant ID not specified. Use -TenantID parameter if you want to specify directly. Authenticating Azure

DEBUG: 2024-07-10_23_34_08 - Cleaning az account cache DEBUG: 2024-07-10_23_34_09 - Calling az login

DEBUG: 2024-07-10_23_34_17 - Checking number of Tenants You have privileges only in One Tenant

Extracting from Tenant fe54621c-7345-42de-b5bd-0fb1931f8a6f DEBUG: 2024-07-10_23_34_17 - Extracting Subscription details DEBUG: 2024-07-10_23_34_18 - Tags will be ignored DEBUG: 2024-07-10_23_34_18 - Number of Subscriptions Found: 8 DEBUG: 2024-07-10_23_34_18 - Checking report folder: C:\AzureResourceInventory\ DEBUG: 2024-07-10_23_34_18 - Invoking Inventory Loop for Resources ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. DEBUG: 2024-07-10_23_34_45 - Invoking Inventory Loop for Network Resources DEBUG: 2024-07-10_23_34_47 - Invoking Inventory Loop for Backup Resources DEBUG: 2024-07-10_23_34_50 - Invoking Inventory Loop for AVD Resources DEBUG: 2024-07-10_23_34_52 - Invoking Inventory Loop for Resource Containers DEBUG: 2024-07-10_23_34_54 - Invoking Inventory Loop for Policies Resources DEBUG: 2024-07-10_23_34_56 - Invoking Inventory Loop for Advisories ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. ConvertFrom-Json: C:\3.1.34\ARI-main\AzureResourceInventory.ps1:596 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line | 0, position 0. DEBUG: 2024-07-10_23_35_18 - Excel file:C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-10_23_35.xlsx DEBUG: 2024-07-10_23_35_18 - Excel Table Style used: Light19 DEBUG: 2024-07-10_23_35_18 - Importing List of Unsupported Versions. DEBUG: 2024-07-10_23_35_18 - Looking for the following file: C:\3.1.34\ARI-main\Extras\Support.json DEBUG: 2024-07-10_23_35_18 - Checking if Draw.io Diagram Job Should be Run. DEBUG: 2024-07-10_23_35_18 - Checking If Should Run Security Center Job. DEBUG: 2024-07-10_23_35_18 - Checking If Should Run Policy Job. DEBUG: 2024-07-10_23_35_18 - Starting Policy Processing Job. DEBUG: 2024-07-10_23_35_18 - Checking If Should Run Advisory Job. DEBUG: 2024-07-10_23_35_18 - Starting Advisory Processing Job. DEBUG: 2024-07-10_23_35_19 - Starting Subscriptions job. DEBUG: 2024-07-10_23_35_19 - Starting Processing Jobs in Medium Mode. DEBUG: 2024-07-10_23_35_19 - Total Resources Being Processed: 8011 DEBUG: 2024-07-10_23_35_19 - Resources Being Processed in ResourceJob_1: 5000 DEBUG: 2024-07-10_23_35_22 - Resources Being Processed in ResourceJob_2: 3010 DEBUG: 2024-07-10_23_35_25 - Starting Jobs Collector. DEBUG: 2024-07-10_23_35_25 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_35_30 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_35_36 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_35_41 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_35_46 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_35_52 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_35_58 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_03 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_11 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_17 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_22 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_27 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_32 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_37 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_42 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_47 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_52 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_36_57 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_37_02 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_37_07 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_37_12 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_37_17 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_37_22 - Jobs Still Running: 2 DEBUG: 2024-07-10_23_37_27 - Jobs Compleated. DEBUG: 2024-07-10_23_37_27 - Job ResourceJob_1 Returned: 40 Resource Types. DEBUG: 2024-07-10_23_37_27 - Job ResourceJob_2 Returned: 41 Resource Types. DEBUG: 2024-07-10_23_37_27 - Starting Reporting Phase. DEBUG: 2024-07-10_23_37_27 - Running Offline, Gathering List Of Modules. DEBUG: 2024-07-10_23_37_27 - Modules Found: 78 DEBUG: 2024-07-10_23_37_32 - Resource Reporting Phase Done. DEBUG: 2024-07-10_23_37_32 - Checking if Should Generate Security Center Sheet. DEBUG: 2024-07-10_23_37_32 - Checking if Should Generate Policy Sheet. DEBUG: 2024-07-10_23_37_32 - Generating Policy Sheet. DEBUG: 2024-07-10_23_37_32 - Looking for the following file: C:\3.1.34\ARI-main\Extras\Policy.ps1 DEBUG: 2024-07-10_23_37_34 - Checking if Should Generate Advisory Sheet. DEBUG: 2024-07-10_23_37_34 - Generating Advisor Sheet. DEBUG: 2024-07-10_23_37_34 - Looking for the following file: C:\3.1.34\ARI-main\Extras\Advisory.ps1 DEBUG: 2024-07-10_23_37_36 - Generating Subscription sheet for: 8 Subscriptions. DEBUG: 2024-07-10_23_37_36 - Looking for the following file: C:\3.1.34\ARI-main\Extras\Subscriptions.ps1 DEBUG: 2024-07-10_23_37_38 - Generating Overview sheet (Charts). DEBUG: 2024-07-10_23_37_38 - Looking for the following file: C:\3.1.34\ARI-main\Extras\Charts.ps1 DEBUG: 2024-07-10_23_37_43 - Finished Charts Phase. Report Complete. Total Runtime was: 3.67 Minutes Total Resources: 8011 Total Advisories: 6042 Total Policies: 21

without tags

raimana commented 2 months ago

@Claudio-Merola @tosser23 I submitted a PR to fix the "Conversion from JSON failed" error, see PR https://github.com/microsoft/ARI/pull/202

There's a redundant ConvertFrom-Json at line 589 of the script, converting from JSON twice: https://github.com/microsoft/ARI/pull/202/files

tosser23 commented 2 months ago

@raimana spot on. I removed the extra bit and it is working now. @Claudio-Merola the only problem now seems to be in the format of the xls report. As you can see xls does not show tabs. Than you as usual

Screenshot_1 Screenshot_2 Screenshot_3 Screenshot_5 Screenshot_4
Claudio-Merola commented 2 months ago

@raimana

good catch, PR approved.

@tosser23

Can you try the script now?

premalad commented 2 months ago

latest script only generating reports with limited details like overview, advisory, policy, quota usage & subscriptions. rest of details are missing. refer attached image

newscript previousscript
tosser23 commented 2 months ago

@Claudio-Merola everything runs fine a part for the formatting of the xls file. In the first image as it used to be

Screenshot_6

and the second refers to the mulfunctioning

Screenshot_7

Thank you big time (we are getting there) beppe

Claudio-Merola commented 2 months ago

@premalad , that indicates the script failed to extract the resources or failed to process them. Can you post the output of the -Debug in here?

@tosser23 , this case is even stranger, by looking the images you posted I have a few questions:

1) Do you have Excel installed in the computer you are running the script?

2) The extraction time (.33 Seconds) seems oddly low for the size of the environment, did the script ran correctly during the entire time?

3) Can you post the -Debug output in here also?

tosser23 commented 2 months ago

@Claudio-Merola

1 no, excel is installed on another PC I simply copy the Advisory xls file on my PC and open it. It used to work with older version od .ps1 2 Report Complete. Total Runtime was: 3.44 Minutes 3 here we go with the debug and THANKS :)

PS C:\3.1.34\mio\ARI-main> .\AzureResourceInventory.ps1 -Debug -SkipPolicy -SkipAdvisory -IncludeTags DEBUG: 2024-07-11_17_03_15 - Debbuging Mode: On. ErrorActionPreference was set to "Continue", every error will be presented. DEBUG: 2024-07-11_17_03_15 - Cleaning default variables DEBUG: 2024-07-11_17_03_15 - Checking if -Online parameter will have to be forced. DEBUG: 2024-07-11_17_03_15 - Starting Extractor function DEBUG: 2024-07-11_17_03_15 - Powershell Edition: Core DEBUG: 2024-07-11_17_03_15 - Powershell Version: 7.4.3 DEBUG: 2024-07-11_17_03_15 - Starting checkAzCli function Validating Az Cli.. WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade' DEBUG: 2024-07-11_17_03_18 - Current az cli version: azure-cli 2.59.0 * Validating Az Cli Extension.. DEBUG: 2024-07-11_17_03_18 - Current Resource-Graph Extension Version: 2.1.0 Validating ImportExcel Module.. DEBUG: 2024-07-11_17_03_19 - ImportExcel Module Version: .. DEBUG: 2024-07-11_17_03_19 - Starting checkPS function PowerShell Desktop Identified.

DEBUG: 2024-07-11_17_03_19 - Starting LoginSession function Azure Cloud Environment: AzureCloud Tenant ID not specified. Use -TenantID parameter if you want to specify directly. Authenticating Azure

DEBUG: 2024-07-11_17_03_20 - Cleaning az account cache DEBUG: 2024-07-11_17_03_21 - Calling az login

DEBUG: 2024-07-11_17_03_36 - Checking number of Tenants You have privileges only in One Tenant

Extracting from Tenant fe54621c-7345-42de-b5bd-0fb1931f8a6f DEBUG: 2024-07-11_17_03_36 - Extracting Subscription details DEBUG: 2024-07-11_17_03_37 - Tags will be included DEBUG: 2024-07-11_17_03_37 - Number of Subscriptions Found: 8 DEBUG: 2024-07-11_17_03_37 - Checking report folder: C:\AzureResourceInventory\ DEBUG: 2024-07-11_17_03_37 - Invoking Inventory Loop for Resources DEBUG: 2024-07-11_17_04_03 - Invoking Inventory Loop for Network Resources DEBUG: 2024-07-11_17_04_05 - Invoking Inventory Loop for Backup Resources DEBUG: 2024-07-11_17_04_08 - Invoking Inventory Loop for AVD Resources DEBUG: 2024-07-11_17_04_10 - Invoking Inventory Loop for Resource Containers DEBUG: 2024-07-11_17_04_12 - Excel file:C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-11_17_04.xlsx DEBUG: 2024-07-11_17_04_12 - Excel Table Style used: Light19 DEBUG: 2024-07-11_17_04_12 - Importing List of Unsupported Versions. DEBUG: 2024-07-11_17_04_12 - Looking for the following file: C:\3.1.34\mio\ARI-main\Extras\Support.json DEBUG: 2024-07-11_17_04_12 - Checking if Draw.io Diagram Job Should be Run. DEBUG: 2024-07-11_17_04_12 - Starting Draw.io Diagram Processing Job. DEBUG: 2024-07-11_17_04_12 - Checking If Should Run Security Center Job. DEBUG: 2024-07-11_17_04_12 - Checking If Should Run Policy Job. DEBUG: 2024-07-11_17_04_12 - Checking If Should Run Advisory Job. DEBUG: 2024-07-11_17_04_12 - Starting Subscriptions job. DEBUG: 2024-07-11_17_04_12 - Starting Processing Jobs in Medium Mode. DEBUG: 2024-07-11_17_04_13 - Total Resources Being Processed: 7875 DEBUG: 2024-07-11_17_04_13 - Resources Being Processed in ResourceJob_1: 5000 DEBUG: 2024-07-11_17_04_15 - Resources Being Processed in ResourceJob_2: 2874 DEBUG: 2024-07-11_17_04_17 - Starting Jobs Collector. DEBUG: 2024-07-11_17_04_18 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_04_23 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_04_31 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_04_38 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_04_45 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_04_53 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_05_01 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_05_12 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_05_18 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_05_23 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_05_28 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_05_35 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_05_40 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_05_45 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_05_50 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_05_55 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_06_00 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_06_05 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_06_10 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_06_15 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_06_20 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_06_25 - Jobs Still Running: 2 DEBUG: 2024-07-11_17_06_31 - Jobs Compleated. DEBUG: 2024-07-11_17_06_31 - Job ResourceJob_1 Returned: 43 Resource Types. DEBUG: 2024-07-11_17_06_31 - Job ResourceJob_2 Returned: 39 Resource Types. DEBUG: 2024-07-11_17_06_31 - Starting Reporting Phase. DEBUG: 2024-07-11_17_06_31 - Running Offline, Gathering List Of Modules. DEBUG: 2024-07-11_17_06_31 - Modules Found: 78 DEBUG: 2024-07-11_17_06_36 - Resource Reporting Phase Done. DEBUG: 2024-07-11_17_06_36 - Checking if Should Generate Security Center Sheet. DEBUG: 2024-07-11_17_06_36 - Checking if Should Generate Policy Sheet. DEBUG: 2024-07-11_17_06_36 - Checking if Should Generate Advisory Sheet. DEBUG: 2024-07-11_17_06_36 - Generating Subscription sheet for: 8 Subscriptions. DEBUG: 2024-07-11_17_06_36 - Looking for the following file: C:\3.1.34\mio\ARI-main\Extras\Subscriptions.ps1 DEBUG: 2024-07-11_17_06_37 - Generating Overview sheet (Charts). DEBUG: 2024-07-11_17_06_37 - Looking for the following file: C:\3.1.34\mio\ARI-main\Extras\Charts.ps1 DEBUG: 2024-07-11_17_06_41 - Finished Charts Phase. Report Complete. Total Runtime was: 3.44 Minutes Total Resources: 7875

Excel file saved at: C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-11_17_04.xlsx

Draw.io Diagram file saved at: C:\AzureResourceInventory\AzureResourceInventory_Diagram_2024-07-11_17_04.xml

premalad commented 2 months ago

@Claudio-Merola - as requested

PS C:> cd .\Software\A Set-Location: Cannot find path 'C:\Software\A' because it does not exist. PS C:> cd .\Software\ARI\ARI-main\ PS C:\Software\ARI\ARI-main> .\AzureResourceInventory.ps1 -Diagram -QuotaUsage -SecurityCenter -debug
DEBUG: 2024-07-11_23_02_59 - Debbuging Mode: On. ErrorActionPreference was set to "Continue", every error will be presented. DEBUG: 2024-07-11_23_03_00 - Cleaning default variables DEBUG: 2024-07-11_23_03_00 - Checking if -Online parameter will have to be forced. DEBUG: 2024-07-11_23_03_00 - Starting Extractor function DEBUG: 2024-07-11_23_03_00 - Powershell Edition: Core
DEBUG: 2024-07-11_23_03_00 - Powershell Version: 7.4.3
DEBUG: 2024-07-11_23_03_00 - Starting checkAzCli function Validating Az Cli.. WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade' DEBUG: 2024-07-11_23_03_02 - Current az cli version: azure-cli 2.61.0 * Validating Az Cli Extension.. DEBUG: 2024-07-11_23_03_03 - Current Resource-Graph Extension Version: 2.1.0 Validating ImportExcel Module.. DEBUG: 2024-07-11_23_03_05 - ImportExcel Module Version: .. DEBUG: 2024-07-11_23_03_05 - Starting checkPS function PowerShell Desktop Identified.

DEBUG: 2024-07-11_23_03_05 - Starting LoginSession function Azure Cloud Environment: AzureCloud Tenant ID not specified. Use -TenantID parameter if you want to specify directly. Authenticating Azure

DEBUG: 2024-07-11_23_03_06 - Cleaning az account cache DEBUG: 2024-07-11_23_03_07 - Calling az login

DEBUG: 2024-07-11_23_05_58 - Checking number of Tenants You have privileges only in One Tenant

Extracting from Tenant DEBUG: 2024-07-11_23_05_58 - Extracting Subscription details DEBUG: 2024-07-11_23_05_59 - Tags will be ignored DEBUG: 2024-07-11_23_05_59 - Number of Subscriptions Found: 41 DEBUG: 2024-07-11_23_05_59 - Checking report folder: C:\AzureResourceInventory\ DEBUG: 2024-07-11_23_05_59 - Invoking Inventory Loop for Resources ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. DEBUG: 2024-07-11_23_07_24 - Invoking Inventory Loop for Network Resources DEBUG: 2024-07-11_23_07_27 - Invoking Inventory Loop for Backup Resources ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. DEBUG: 2024-07-11_23_07_35 - Invoking Inventory Loop for AVD Resources DEBUG: 2024-07-11_23_07_38 - Invoking Inventory Loop for Resource Containers ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. DEBUG: 2024-07-11_23_07_43 - Invoking Inventory Loop for Policies Resources ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. DEBUG: 2024-07-11_23_07_50 - Invoking Inventory Loop for Advisories ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. DEBUG: 2024-07-11_23_08_58 - Invoking Inventory Loop for Security Resources ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. ConvertFrom-Json: C:\Software\ARI\ARI-main\AzureResourceInventory.ps1:596:67 Line | 596 | … $QueryResult = $QueryResult | ConvertFrom-Json -AsHashtable | ~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path
| '', line 0, position 0. DEBUG: 2024-07-11_23_12_09 - Excel file:C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-11_23_12.xlsx DEBUG: 2024-07-11_23_12_09 - Excel Table Style used: Light19 DEBUG: 2024-07-11_23_12_09 - Importing List of Unsupported Versions. DEBUG: 2024-07-11_23_12_09 - Looking for the following file: C:\Software\ARI\ARI-main\Extras\Support.json
DEBUG: 2024-07-11_23_12_09 - Checking if Draw.io Diagram Job Should be Run. DEBUG: 2024-07-11_23_12_09 - Starting Draw.io Diagram Processing Job. DEBUG: 2024-07-11_23_12_09 - Checking If Should Run Security Center Job. DEBUG: 2024-07-11_23_12_09 - Starting Security Job. DEBUG: 2024-07-11_23_12_09 - Checking If Should Run Policy Job. DEBUG: 2024-07-11_23_12_09 - Starting Policy Processing Job. DEBUG: 2024-07-11_23_12_10 - Checking If Should Run Advisory Job. DEBUG: 2024-07-11_23_12_10 - Starting Advisory Processing Job. DEBUG: 2024-07-11_23_12_10 - Starting Subscriptions job. DEBUG: 2024-07-11_23_12_10 - Starting Processing Jobs in Medium Mode. DEBUG: 2024-07-11_23_12_10 - Total Resources Being Processed: 23814 DEBUG: 2024-07-11_23_12_11 - Resources Being Processed in ResourceJob_1: 5000 DEBUG: 2024-07-11_23_12_15 - Resources Being Processed in ResourceJob_2: 5000 DEBUG: 2024-07-11_23_12_17 - Resources Being Processed in ResourceJob_3: 5000 DEBUG: 2024-07-11_23_12_19 - Resources Being Processed in ResourceJob_4: 5000 DEBUG: 2024-07-11_23_12_21 - Resources Being Processed in ResourceJob_5: 3814 DEBUG: 2024-07-11_23_12_22 - Starting Jobs Collector. DEBUG: 2024-07-11_23_12_22 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_12_27 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_12_32 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_12_38 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_12_43 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_12_48 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_12_53 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_12_58 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_13_03 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_13_08 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_13_14 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_13_20 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_13_25 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_13_30 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_13_44 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_13_49 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_13_54 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_13_59 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_05 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_10 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_16 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_21 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_26 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_31 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_36 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_41 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_46 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_51 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_14_56 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_15_01 - Jobs Still Running: 5 DEBUG: 2024-07-11_23_15_06 - Jobs Still Running: 4 DEBUG: 2024-07-11_23_15_11 - Jobs Still Running: 3 DEBUG: 2024-07-11_23_15_16 - Jobs Still Running: 3 DEBUG: 2024-07-11_23_15_21 - Jobs Still Running: 2 DEBUG: 2024-07-11_23_15_26 - Jobs Still Running: 2 DEBUG: 2024-07-11_23_15_31 - Jobs Still Running: 1 DEBUG: 2024-07-11_23_15_37 - Jobs Compleated. DEBUG: 2024-07-11_23_15_37 - Job ResourceJob_1 Returned: 48 Resource Types. DEBUG: 2024-07-11_23_15_37 - Job ResourceJob_2 Returned: 38 Resource Types. DEBUG: 2024-07-11_23_15_37 - Job ResourceJob_3 Returned: 39 Resource Types. DEBUG: 2024-07-11_23_15_37 - Job ResourceJob_4 Returned: 30 Resource Types. DEBUG: 2024-07-11_23_15_37 - Job ResourceJob_5 Returned: 38 Resource Types. DEBUG: 2024-07-11_23_15_37 - Starting Reporting Phase. DEBUG: 2024-07-11_23_15_37 - Running Offline, Gathering List Of Modules. DEBUG: 2024-07-11_23_15_38 - Modules Found: 78 DEBUG: 2024-07-11_23_15_48 - Resource Reporting Phase Done. DEBUG: 2024-07-11_23_17_52 - Generating Quota Usage sheet for: 41 Subscriptions/Regions. DEBUG: 2024-07-11_23_17_52 - Looking for the following file: C:\Software\ARI\ARI-main\Extras\QuotaUsage.ps1
DEBUG: 2024-07-11_23_18_01 - Checking if Should Generate Security Center Sheet. DEBUG: 2024-07-11_23_18_01 - Generating Security Center Sheet. DEBUG: 2024-07-11_23_19_08 - Looking for the following file: C:\Software\ARI\ARI-main\Extras\SecurityCenter.ps1DEBUG: 2024-07-11_23_20_03 - Checking if Should Generate Policy Sheet. DEBUG: 2024-07-11_23_20_03 - Generating Policy Sheet. DEBUG: 2024-07-11_23_20_03 - Looking for the following file: C:\Software\ARI\ARI-main\Extras\Policy.ps1
DEBUG: 2024-07-11_23_20_10 - Checking if Should Generate Advisory Sheet. DEBUG: 2024-07-11_23_20_10 - Generating Advisor Sheet. DEBUG: 2024-07-11_23_20_10 - Looking for the following file: C:\Software\ARI\ARI-main\Extras\Advisory.ps1
DEBUG: 2024-07-11_23_20_38 - Generating Subscription sheet for: 41 Subscriptions. DEBUG: 2024-07-11_23_20_38 - Looking for the following file: C:\Software\ARI\ARI-main\Extras\Subscriptions.ps1 DEBUG: 2024-07-11_23_20_47 - Generating Overview sheet (Charts). DEBUG: 2024-07-11_23_20_47 - Looking for the following file: C:\Software\ARI\ARI-main\Extras\Charts.ps1
DEBUG: 2024-07-11_23_21_50 - Finished Charts Phase. Report Complete. Total Runtime was: 20.86 Minutes Total Resources: 23814 Total Advisories: 18882 Total Policies: 1207 Total Security Advisories: 37774

Excel file saved at: C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-11_23_12.xlsx

Draw.io Diagram file saved at: C:\AzureResourceInventory\AzureResourceInventory_Diagram_2024-07-11_23_12.xml

PS C:\Software\ARI\ARI-main>

Claudio-Merola commented 2 months ago

@tosser23 , I might have a clue of what is going on, can you try to run the script using the -Lite parameter?

@premalad , apparently you are having the same issue tosser was having, I believe you might not be running the latest version of the script, can you download the main script from the repo and run that version?

tosser23 commented 2 months ago

@Claudio-Merola unfortunately no changes 71 KB of xls where it was more than 2MB before.....

PS C:\3.1.35\ARI-main> .\AzureResourceInventory.ps1 -Debug -SkipPolicy -SkipAdvisory -IncludeTags -Lite DEBUG: 2024-07-11_19_34_51 - Debbuging Mode: On. ErrorActionPreference was set to "Continue", every error will be presented. DEBUG: 2024-07-11_19_34_51 - Cleaning default variables DEBUG: 2024-07-11_19_34_51 - Checking if -Online parameter will have to be forced. DEBUG: 2024-07-11_19_34_51 - Starting Extractor function DEBUG: 2024-07-11_19_34_51 - Powershell Edition: Core DEBUG: 2024-07-11_19_34_51 - Powershell Version: 7.4.3 DEBUG: 2024-07-11_19_34_51 - Starting checkAzCli function Validating Az Cli.. WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade' DEBUG: 2024-07-11_19_34_54 - Current az cli version: azure-cli 2.59.0 * Validating Az Cli Extension.. DEBUG: 2024-07-11_19_34_54 - Current Resource-Graph Extension Version: 2.1.0 Validating ImportExcel Module.. DEBUG: 2024-07-11_19_34_55 - ImportExcel Module Version: .. DEBUG: 2024-07-11_19_34_55 - Starting checkPS function PowerShell Desktop Identified.

DEBUG: 2024-07-11_19_34_55 - Starting LoginSession function Azure Cloud Environment: AzureCloud Tenant ID not specified. Use -TenantID parameter if you want to specify directly. Authenticating Azure

DEBUG: 2024-07-11_19_34_56 - Cleaning az account cache DEBUG: 2024-07-11_19_34_57 - Calling az login

DEBUG: 2024-07-11_19_35_28 - Checking number of Tenants You have privileges only in One Tenant

Extracting from Tenant fe54621c-7345-42de-b5bd-0fb1931f8a6f DEBUG: 2024-07-11_19_35_28 - Extracting Subscription details DEBUG: 2024-07-11_19_35_29 - Tags will be included DEBUG: 2024-07-11_19_35_29 - Number of Subscriptions Found: 8 DEBUG: 2024-07-11_19_35_29 - Checking report folder: C:\AzureResourceInventory\ DEBUG: 2024-07-11_19_35_29 - Invoking Inventory Loop for Resources DEBUG: 2024-07-11_19_35_57 - Invoking Inventory Loop for Network Resources DEBUG: 2024-07-11_19_35_59 - Invoking Inventory Loop for Backup Resources DEBUG: 2024-07-11_19_36_02 - Invoking Inventory Loop for AVD Resources DEBUG: 2024-07-11_19_36_04 - Invoking Inventory Loop for Resource Containers DEBUG: 2024-07-11_19_36_05 - Excel file:C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-11_19_36.xlsx DEBUG: 2024-07-11_19_36_06 - Excel Table Style used: Light19 DEBUG: 2024-07-11_19_36_06 - Importing List of Unsupported Versions. DEBUG: 2024-07-11_19_36_06 - Looking for the following file: C:\3.1.35\ARI-main\Extras\Support.json DEBUG: 2024-07-11_19_36_06 - Checking if Draw.io Diagram Job Should be Run. DEBUG: 2024-07-11_19_36_06 - Starting Draw.io Diagram Processing Job. DEBUG: 2024-07-11_19_36_06 - Checking If Should Run Security Center Job. DEBUG: 2024-07-11_19_36_06 - Checking If Should Run Policy Job. DEBUG: 2024-07-11_19_36_06 - Checking If Should Run Advisory Job. DEBUG: 2024-07-11_19_36_06 - Starting Subscriptions job. DEBUG: 2024-07-11_19_36_06 - Starting Processing Jobs in Medium Mode. DEBUG: 2024-07-11_19_36_07 - Total Resources Being Processed: 7881 DEBUG: 2024-07-11_19_36_07 - Resources Being Processed in ResourceJob_1: 5000 DEBUG: 2024-07-11_19_36_09 - Resources Being Processed in ResourceJob_2: 2880 DEBUG: 2024-07-11_19_36_11 - Starting Jobs Collector. DEBUG: 2024-07-11_19_36_12 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_36_17 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_36_22 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_36_27 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_36_35 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_36_41 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_36_47 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_36_56 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_37_05 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_37_13 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_37_18 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_37_25 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_37_30 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_37_35 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_37_40 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_37_45 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_37_50 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_37_55 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_38_00 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_38_05 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_38_10 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_38_15 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_38_20 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_38_25 - Jobs Still Running: 1 DEBUG: 2024-07-11_19_38_30 - Jobs Compleated. DEBUG: 2024-07-11_19_38_30 - Job ResourceJob_1 Returned: 43 Resource Types. DEBUG: 2024-07-11_19_38_30 - Job ResourceJob_2 Returned: 39 Resource Types. DEBUG: 2024-07-11_19_38_30 - Starting Reporting Phase. DEBUG: 2024-07-11_19_38_30 - Running Offline, Gathering List Of Modules. DEBUG: 2024-07-11_19_38_30 - Modules Found: 78 DEBUG: 2024-07-11_19_38_35 - Resource Reporting Phase Done. DEBUG: 2024-07-11_19_38_35 - Checking if Should Generate Security Center Sheet. DEBUG: 2024-07-11_19_38_35 - Checking if Should Generate Policy Sheet. DEBUG: 2024-07-11_19_38_35 - Checking if Should Generate Advisory Sheet. DEBUG: 2024-07-11_19_38_35 - Generating Subscription sheet for: 8 Subscriptions. DEBUG: 2024-07-11_19_38_35 - Looking for the following file: C:\3.1.35\ARI-main\Extras\Subscriptions.ps1 DEBUG: 2024-07-11_19_38_36 - Generating Overview sheet (Charts). DEBUG: 2024-07-11_19_38_36 - Looking for the following file: C:\3.1.35\ARI-main\Extras\Charts.ps1 DEBUG: 2024-07-11_19_38_40 - Finished Charts Phase. Report Complete. Total Runtime was: 3.81 Minutes Total Resources: 7881

Excel file saved at: C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-11_19_36.xlsx

Draw.io Diagram file saved at: C:\AzureResourceInventory\AzureResourceInventory_Diagram_2024-07-11_19_36.xml

tosser23 commented 2 months ago

@Claudio-Merola the dubug of your inventory three weeks ago (Version: 3.1.27 ) gave me an xls file of nearly 3 MB for instance PS C:\three weeks ago\AR> .\AzureResourceInventory.ps1 -Debug -SkipPolicy -SkipAdvisory -IncludeTags -Lite DEBUG: 2024-07-11_19_50_06 - Debbuging Mode: On. ErrorActionPreference was set to "Continue", every error will be presented. DEBUG: 2024-07-11_19_50_06 - Cleaning default variables DEBUG: 2024-07-11_19_50_06 - Checking if -Online parameter will have to be forced. DEBUG: 2024-07-11_19_50_06 - Starting Extractor function DEBUG: 2024-07-11_19_50_06 - Starting checkAzCli function Validating Az Cli.. WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade' DEBUG: 2024-07-11_19_50_08 - Current az cli version: azure-cli 2.59.0 * Validating Az Cli Extension.. DEBUG: 2024-07-11_19_50_09 - Current Resource-Graph Extension Version: 2.1.0 Validating ImportExcel Module.. DEBUG: 2024-07-11_19_50_09 - ImportExcel Module Version: .. DEBUG: 2024-07-11_19_50_09 - Starting checkPS function PowerShell Desktop Identified.

DEBUG: 2024-07-11_19_50_10 - Starting LoginSession function Azure Cloud Environment: AzureCloud Tenant ID not specified. Use -TenantID parameter if you want to specify directly. Authenticating Azure

DEBUG: 2024-07-11_19_50_10 - Cleaning az account cache DEBUG: 2024-07-11_19_50_11 - Calling az login

DEBUG: 2024-07-11_19_50_20 - Checking number of Tenants You have privileges only in One Tenant

Extracting from Tenant fe54621c-7345-42de-b5bd-0fb1931f8a6f DEBUG: 2024-07-11_19_50_20 - Extracting Subscription details DEBUG: 2024-07-11_19_50_21 - Tags will be included DEBUG: 2024-07-11_19_50_21 - Number of Subscriptions Found: 8 DEBUG: 2024-07-11_19_50_21 - Checking report folder: C:\AzureResourceInventory\ DEBUG: 2024-07-11_19_50_21 - Invoking Inventory Loop for Resources DEBUG: 2024-07-11_19_50_23 - Total Number of Resources Found: 7228 DEBUG: 2024-07-11_19_50_53 - Invoking Inventory Loop for Network Resources DEBUG: 2024-07-11_19_50_54 - Total Number of Resources Found: 0 DEBUG: 2024-07-11_19_50_54 - Invoking Inventory Loop for Backup Resources DEBUG: 2024-07-11_19_50_56 - Total Number of Resources Found: 638 DEBUG: 2024-07-11_19_51_00 - Invoking Inventory Loop for AVD Resources DEBUG: 2024-07-11_19_51_01 - Total Number of Resources Found: 2 DEBUG: 2024-07-11_19_51_03 - Invoking Inventory Loop for Resource Containers DEBUG: 2024-07-11_19_51_05 - Total Number of Resources Found: 358 DEBUG: 2024-07-11_19_51_07 - Excel file:C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-11_19_51.xlsx DEBUG: 2024-07-11_19_51_07 - Excel Table Style used: Light19 DEBUG: 2024-07-11_19_51_07 - Importing List of Unsupported Versions. DEBUG: 2024-07-11_19_51_07 - Looking for the following file: C:\three weeks ago\AR\Extras\Support.json DEBUG: 2024-07-11_19_51_07 - Checking if Draw.io Diagram Job Should be Run. DEBUG: 2024-07-11_19_51_07 - Starting Draw.io Diagram Processing Job. DEBUG: 2024-07-11_19_51_07 - Checking If Should Run Security Center Job. DEBUG: 2024-07-11_19_51_07 - Checking If Should Run Policy Job. DEBUG: 2024-07-11_19_51_07 - Checking If Should Run Advisory Job. DEBUG: 2024-07-11_19_51_07 - Starting Subscriptions job. DEBUG: 2024-07-11_19_51_08 - Starting Processing Jobs in Medium Mode. DEBUG: 2024-07-11_19_51_08 - Total Resources Being Processed: 7868 DEBUG: 2024-07-11_19_51_08 - Resources Being Processed in ResourceJob_1: 5000 DEBUG: 2024-07-11_19_51_13 - Resources Being Processed in ResourceJob_2: 2868 DEBUG: 2024-07-11_19_51_15 - Starting Jobs Collector. DEBUG: 2024-07-11_19_51_15 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_51_18 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_51_22 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_51_27 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_51_31 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_51_34 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_51_41 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_51_46 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_51_50 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_51_57 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_02 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_05 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_08 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_11 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_14 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_17 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_20 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_23 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_26 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_29 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_32 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_35 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_38 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_41 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_44 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_47 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_50 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_53 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_56 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_52_59 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_53_02 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_53_05 - Jobs Still Running: 2 DEBUG: 2024-07-11_19_53_08 - Jobs Still Running: 1 DEBUG: 2024-07-11_19_53_11 - Jobs Compleated. DEBUG: 2024-07-11_19_53_11 - Job ResourceJob_1 Returned: 43 Resource Types. DEBUG: 2024-07-11_19_53_11 - Job ResourceJob_2 Returned: 39 Resource Types. DEBUG: 2024-07-11_19_53_11 - Starting Reporting Phase. DEBUG: 2024-07-11_19_53_11 - Running Offline, Gathering List Of Modules. DEBUG: 2024-07-11_19_53_11 - Modules Found: 65 DEBUG: 2024-07-11_19_53_11 - Running Module: 'C:\three weeks ago\AR\Modules\Analytics\Databricks.ps1' DEBUG: 2024-07-11_19_53_12 - Running Module: 'C:\three weeks ago\AR\Modules\Analytics\EvtHub.ps1' DEBUG: 2024-07-11_19_53_14 - Running Module: 'C:\three weeks ago\AR\Modules\Analytics\MachineLearning.ps1' DEBUG: 2024-07-11_19_53_15 - Running Module: 'C:\three weeks ago\AR\Modules\Analytics\Streamanalytics.ps1' DEBUG: 2024-07-11_19_53_15 - Running Module: 'C:\three weeks ago\AR\Modules\Analytics\Synapse.ps1' DEBUG: 2024-07-11_19_53_16 - Running Module: 'C:\three weeks ago\AR\Modules\Analytics\WrkSpace.ps1' DEBUG: 2024-07-11_19_53_18 - Running Module: 'C:\three weeks ago\AR\Modules\Compute\APPSERVICEPLAN.ps1' DEBUG: 2024-07-11_19_53_19 - Running Module: 'C:\three weeks ago\AR\Modules\Compute\APPSERVICES.ps1' DEBUG: 2024-07-11_19_53_23 - Running Module: 'C:\three weeks ago\AR\Modules\Compute\ARCServers.ps1' DEBUG: 2024-07-11_19_53_24 - Running Module: 'C:\three weeks ago\AR\Modules\Compute\ARO.ps1' DEBUG: 2024-07-11_19_53_25 - Running Module: 'C:\three weeks ago\AR\Modules\Compute\AVD.ps1' DEBUG: 2024-07-11_19_53_26 - Running Module: 'C:\three weeks ago\AR\Modules\Compute\CloudServices.ps1' DEBUG: 2024-07-11_19_53_26 - Running Module: 'C:\three weeks ago\AR\Modules\Compute\VM.ps1' DEBUG: 2024-07-11_19_53_41 - Running Module: 'C:\three weeks ago\AR\Modules\Compute\VMWare.ps1' DEBUG: 2024-07-11_19_53_42 - Running Module: 'C:\three weeks ago\AR\Modules\Containers\AKS.ps1' DEBUG: 2024-07-11_19_53_46 - Running Module: 'C:\three weeks ago\AR\Modules\Containers\CONTAINER.ps1' DEBUG: 2024-07-11_19_53_48 - Running Module: 'C:\three weeks ago\AR\Modules\Containers\REGISTRIES.ps1' DEBUG: 2024-07-11_19_53_50 - Running Module: 'C:\three weeks ago\AR\Modules\Containers\VMSS.ps1' DEBUG: 2024-07-11_19_53_52 - Running Module: 'C:\three weeks ago\AR\Modules\Data\CosmosDB.ps1' DEBUG: 2024-07-11_19_53_54 - Running Module: 'C:\three weeks ago\AR\Modules\Data\MariaDB.ps1' DEBUG: 2024-07-11_19_53_55 - Running Module: 'C:\three weeks ago\AR\Modules\Data\MySQL.ps1' DEBUG: 2024-07-11_19_53_55 - Running Module: 'C:\three weeks ago\AR\Modules\Data\MySQLflexible.ps1' DEBUG: 2024-07-11_19_53_56 - Running Module: 'C:\three weeks ago\AR\Modules\Data\POSTGRE.ps1' DEBUG: 2024-07-11_19_54_00 - Running Module: 'C:\three weeks ago\AR\Modules\Data\POSTGREFlexible.ps1' DEBUG: 2024-07-11_19_54_00 - Running Module: 'C:\three weeks ago\AR\Modules\Data\Purview.ps1' DEBUG: 2024-07-11_19_54_01 - Running Module: 'C:\three weeks ago\AR\Modules\Data\RedisCache.ps1' DEBUG: 2024-07-11_19_54_04 - Running Module: 'C:\three weeks ago\AR\Modules\Data\SQLDB.ps1' DEBUG: 2024-07-11_19_54_07 - Running Module: 'C:\three weeks ago\AR\Modules\Data\SQLMI.ps1' DEBUG: 2024-07-11_19_54_09 - Running Module: 'C:\three weeks ago\AR\Modules\Data\SQLMIDB.ps1' DEBUG: 2024-07-11_19_54_11 - Running Module: 'C:\three weeks ago\AR\Modules\Data\SQLPOOL.ps1' DEBUG: 2024-07-11_19_54_13 - Running Module: 'C:\three weeks ago\AR\Modules\Data\SQLSERVER.ps1' DEBUG: 2024-07-11_19_54_15 - Running Module: 'C:\three weeks ago\AR\Modules\Data\SQLVM.ps1' DEBUG: 2024-07-11_19_54_17 - Running Module: 'C:\three weeks ago\AR\Modules\Infrastructure\AppGW.ps1' DEBUG: 2024-07-11_19_54_21 - Running Module: 'C:\three weeks ago\AR\Modules\Infrastructure\AutomationAcc.ps1' DEBUG: 2024-07-11_19_54_24 - Running Module: 'C:\three weeks ago\AR\Modules\Infrastructure\AvSet.ps1' DEBUG: 2024-07-11_19_54_26 - Running Module: 'C:\three weeks ago\AR\Modules\Infrastructure\BASTION.ps1' DEBUG: 2024-07-11_19_54_28 - Running Module: 'C:\three weeks ago\AR\Modules\Infrastructure\Frontdoor.ps1' DEBUG: 2024-07-11_19_54_29 - Running Module: 'C:\three weeks ago\AR\Modules\Infrastructure\RecoveryVault.ps1' DEBUG: 2024-07-11_19_54_31 - Running Module: 'C:\three weeks ago\AR\Modules\Infrastructure\Vault.ps1' DEBUG: 2024-07-11_19_54_33 - Running Module: 'C:\three weeks ago\AR\Modules\Integration\APIM.ps1' DEBUG: 2024-07-11_19_54_35 - Running Module: 'C:\three weeks ago\AR\Modules\Integration\AppInsights.ps1' DEBUG: 2024-07-11_19_54_38 - Running Module: 'C:\three weeks ago\AR\Modules\Integration\Backup.ps1' DEBUG: 2024-07-11_19_54_40 - Running Module: 'C:\three weeks ago\AR\Modules\Integration\IOTHubs.ps1' DEBUG: 2024-07-11_19_54_41 - Running Module: 'C:\three weeks ago\AR\Modules\Integration\ServiceBUS.ps1' DEBUG: 2024-07-11_19_54_43 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\AzureFirewall.ps1' DEBUG: 2024-07-11_19_54_43 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\Connections.ps1' DEBUG: 2024-07-11_19_54_46 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\ExpressRoute.ps1' DEBUG: 2024-07-11_19_54_48 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\LoadBalancer.ps1' DEBUG: 2024-07-11_19_54_52 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\NATGAteway.ps1' DEBUG: 2024-07-11_19_54_55 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\NetworkInterface.ps1' DEBUG: 2024-07-11_19_55_00 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\NetworkSecurityGroup.ps1' DEBUG: 2024-07-11_19_55_25 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\PrivateDNS.ps1' DEBUG: 2024-07-11_19_55_28 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\PrivateEndpoint.ps1' DEBUG: 2024-07-11_19_55_31 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\PublicDNS.ps1' DEBUG: 2024-07-11_19_55_34 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\PublicIP.ps1' DEBUG: 2024-07-11_19_55_40 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\ROUTETABLE.ps1' DEBUG: 2024-07-11_19_55_44 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\TrafficManager.ps1' DEBUG: 2024-07-11_19_55_44 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\VirtualNetwork.ps1' DEBUG: 2024-07-11_19_55_51 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\VirtualWAN.ps1' DEBUG: 2024-07-11_19_55_52 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\VNETGTW.ps1' DEBUG: 2024-07-11_19_55_55 - Running Module: 'C:\three weeks ago\AR\Modules\Networking\vNETPeering.ps1' DEBUG: 2024-07-11_19_55_59 - Running Module: 'C:\three weeks ago\AR\Modules\Storage\DataExplorerCluster.ps1' DEBUG: 2024-07-11_19_55_59 - Running Module: 'C:\three weeks ago\AR\Modules\Storage\NetApp.ps1' DEBUG: 2024-07-11_19_56_00 - Running Module: 'C:\three weeks ago\AR\Modules\Storage\StorageAcc.ps1' DEBUG: 2024-07-11_19_56_08 - Running Module: 'C:\three weeks ago\AR\Modules\Storage\VMDisk.ps1' DEBUG: 2024-07-11_19_56_18 - Resource Reporting Phase Done. DEBUG: 2024-07-11_19_56_18 - Checking if Should Generate Security Center Sheet. DEBUG: 2024-07-11_19_56_18 - Checking if Should Generate Policy Sheet. DEBUG: 2024-07-11_19_56_18 - Checking if Should Generate Advisory Sheet. DEBUG: 2024-07-11_19_56_18 - Generating Subscription sheet for: 8 Subscriptions. DEBUG: 2024-07-11_19_56_18 - Looking for the following file: C:\three weeks ago\AR\Extras\Subscriptions.ps1 DEBUG: 2024-07-11_19_56_22 - Generating Overview sheet (Charts). DEBUG: 2024-07-11_19_56_22 - Looking for the following file: C:\three weeks ago\AR\Extras\Charts.ps1 DEBUG: 2024-07-11_19_56_40 - Finished Charts Phase. Report Complete. Total Runtime was: 6.57 Minutes Total Resources: 7868

Excel file saved at: C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-11_19_51.xlsx

Draw.io Diagram file saved at: C:\AzureResourceInventory\AzureResourceInventory_Diagram_2024-07-11_19_51.xml

premalad commented 2 months ago

@Claudio-Merola even run the latest script still the same. here is the debug:

S C:\3.1.35\ARI-main> .\AzureResourceInventory.ps1 -debug
DEBUG: 2024-07-12_13_08_37 - Debbuging Mode: On. ErrorActionPreference was set to "Continue", every error will be presented. DEBUG: 2024-07-12_13_08_37 - Cleaning default variables DEBUG: 2024-07-12_13_08_37 - Checking if -Online parameter will have to be forced. DEBUG: 2024-07-12_13_08_37 - Starting Extractor function DEBUG: 2024-07-12_13_08_37 - Powershell Edition: Core DEBUG: 2024-07-12_13_08_37 - Powershell Version: 7.4.3 DEBUG: 2024-07-12_13_08_37 - Starting checkAzCli function Validating Az Cli.. WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade' DEBUG: 2024-07-12_13_08_39 - Current az cli version: azure-cli 2.61.0 * Validating Az Cli Extension.. DEBUG: 2024-07-12_13_08_40 - Current Resource-Graph Extension Version: 2.1.0 Validating ImportExcel Module.. DEBUG: 2024-07-12_13_08_40 - ImportExcel Module Version: .. DEBUG: 2024-07-12_13_08_40 - Starting checkPS function PowerShell Desktop Identified.

DEBUG: 2024-07-12_13_08_40 - Starting LoginSession function Azure Cloud Environment: AzureCloud Tenant ID not specified. Use -TenantID parameter if you want to specify directly. Authenticating Azure

DEBUG: 2024-07-12_13_08_41 - Cleaning az account cache DEBUG: 2024-07-12_13_08_42 - Calling az login

DEBUG: 2024-07-12_13_08_55 - Checking number of Tenants You have privileges only in One Tenant

Extracting from Tenant DEBUG: 2024-07-12_13_08_55 - Extracting Subscription details DEBUG: 2024-07-12_13_08_56 - Tags will be ignored DEBUG: 2024-07-12_13_08_56 - Number of Subscriptions Found: 41 DEBUG: 2024-07-12_13_08_56 - Checking report folder: C:\AzureResourceInventory\ DEBUG: 2024-07-12_13_08_56 - Invoking Inventory Loop for Resources DEBUG: 2024-07-12_13_10_47 - Invoking Inventory Loop for Network Resources
DEBUG: 2024-07-12_13_10_51 - Invoking Inventory Loop for Backup Resources
DEBUG: 2024-07-12_13_10_59 - Invoking Inventory Loop for AVD Resources
DEBUG: 2024-07-12_13_11_02 - Invoking Inventory Loop for Resource Containers
DEBUG: 2024-07-12_13_11_06 - Invoking Inventory Loop for Policies Resources
DEBUG: 2024-07-12_13_11_15 - Invoking Inventory Loop for Advisories
DEBUG: 2024-07-12_13_12_32 - Excel file:C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-12_13_12.xlsx
DEBUG: 2024-07-12_13_12_32 - Excel Table Style used: Light19 DEBUG: 2024-07-12_13_12_32 - Importing List of Unsupported Versions. DEBUG: 2024-07-12_13_12_32 - Looking for the following file: C:\3.1.35\ARI-main\Extras\Support.json DEBUG: 2024-07-12_13_12_32 - Checking if Draw.io Diagram Job Should be Run.
DEBUG: 2024-07-12_13_12_32 - Starting Draw.io Diagram Processing Job. DEBUG: 2024-07-12_13_12_33 - Checking If Should Run Security Center Job.
DEBUG: 2024-07-12_13_12_33 - Checking If Should Run Policy Job. DEBUG: 2024-07-12_13_12_33 - Starting Policy Processing Job. DEBUG: 2024-07-12_13_12_33 - Checking If Should Run Advisory Job.
DEBUG: 2024-07-12_13_12_33 - Starting Advisory Processing Job. DEBUG: 2024-07-12_13_12_33 - Starting Subscriptions job.
DEBUG: 2024-07-12_13_12_33 - Starting Processing Jobs in Medium Mode.
DEBUG: 2024-07-12_13_12_33 - Total Resources Being Processed: 23973 DEBUG: 2024-07-12_13_12_34 - Resources Being Processed in ResourceJob_1: 5000
DEBUG: 2024-07-12_13_12_37 - Resources Being Processed in ResourceJob_2: 5000
DEBUG: 2024-07-12_13_12_39 - Resources Being Processed in ResourceJob_3: 5000
DEBUG: 2024-07-12_13_12_41 - Resources Being Processed in ResourceJob_4: 5000
DEBUG: 2024-07-12_13_12_44 - Resources Being Processed in ResourceJob_5: 3973
DEBUG: 2024-07-12_13_12_46 - Starting Jobs Collector. DEBUG: 2024-07-12_13_12_46 - Jobs Still Running: 5 DEBUG: 2024-07-12_13_12_52 - Jobs Still Running: 5 DEBUG: 2024-07-12_13_12_57 - Jobs Still Running: 5 DEBUG: 2024-07-12_13_13_02 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_13_07 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_13_12 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_13_18 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_13_23 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_13_28 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_13_34 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_13_40 - Jobs Still Running: 5 DEBUG: 2024-07-12_13_13_46 - Jobs Still Running: 5 DEBUG: 2024-07-12_13_13_55 - Jobs Still Running: 5 DEBUG: 2024-07-12_13_14_01 - Jobs Still Running: 5 DEBUG: 2024-07-12_13_14_06 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_14_12 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_14_17 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_14_22 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_14_27 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_14_32 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_14_41 - Jobs Still Running: 5 DEBUG: 2024-07-12_13_14_46 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_14_51 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_14_56 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_15_01 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_15_06 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_15_11 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_15_16 - Jobs Still Running: 5
DEBUG: 2024-07-12_13_15_21 - Jobs Still Running: 4
DEBUG: 2024-07-12_13_15_26 - Jobs Still Running: 4
DEBUG: 2024-07-12_13_15_31 - Jobs Still Running: 4
DEBUG: 2024-07-12_13_15_36 - Jobs Still Running: 3
DEBUG: 2024-07-12_13_15_41 - Jobs Still Running: 3
DEBUG: 2024-07-12_13_15_46 - Jobs Still Running: 2
DEBUG: 2024-07-12_13_15_51 - Jobs Still Running: 2
DEBUG: 2024-07-12_13_15_56 - Jobs Still Running: 1
DEBUG: 2024-07-12_13_16_01 - Jobs Compleated.
DEBUG: 2024-07-12_13_16_01 - Job ResourceJob_1 Returned: 48 Resource Types.
DEBUG: 2024-07-12_13_16_01 - Job ResourceJob_2 Returned: 38 Resource Types. DEBUG: 2024-07-12_13_16_01 - Job ResourceJob_3 Returned: 39 Resource Types. DEBUG: 2024-07-12_13_16_01 - Job ResourceJob_4 Returned: 30 Resource Types.
DEBUG: 2024-07-12_13_16_01 - Job ResourceJob_5 Returned: 38 Resource Types. DEBUG: 2024-07-12_13_16_01 - Starting Reporting Phase. DEBUG: 2024-07-12_13_16_01 - Running Offline, Gathering List Of Modules. DEBUG: 2024-07-12_13_16_01 - Modules Found: 78
DEBUG: 2024-07-12_13_16_06 - Resource Reporting Phase Done.
DEBUG: 2024-07-12_13_16_06 - Checking if Should Generate Security Center Sheet. DEBUG: 2024-07-12_13_16_06 - Checking if Should Generate Policy Sheet. DEBUG: 2024-07-12_13_16_06 - Generating Policy Sheet. DEBUG: 2024-07-12_13_16_06 - Looking for the following file: C:\3.1.35\ARI-main\Extras\Policy.ps1
DEBUG: 2024-07-12_13_16_11 - Checking if Should Generate Advisory Sheet. DEBUG: 2024-07-12_13_16_11 - Generating Advisor Sheet. DEBUG: 2024-07-12_13_16_11 - Looking for the following file: C:\3.1.35\ARI-main\Extras\Advisory.ps1
DEBUG: 2024-07-12_13_16_27 - Generating Subscription sheet for: 41 Subscriptions.
DEBUG: 2024-07-12_13_16_27 - Looking for the following file: C:\3.1.35\ARI-main\Extras\Subscriptions.ps1 DEBUG: 2024-07-12_13_16_35 - Generating Overview sheet (Charts).
DEBUG: 2024-07-12_13_16_35 - Looking for the following file: C:\3.1.35\ARI-main\Extras\Charts.ps1 DEBUG: 2024-07-12_13_17_02 - Finished Charts Phase.
Report Complete. Total Runtime was: 13.27 Minutes Total Resources: 23973 Total Advisories: 19845 Total Policies: 1207

Excel file saved at: C:\AzureResourceInventory\AzureResourceInventory_Report_2024-07-12_13_12.xlsx

Draw.io Diagram file saved at: C:\AzureResourceInventory\AzureResourceInventory_Diagram_2024-07-12_13_12.xml

Claudio-Merola commented 2 months ago

Thanks for the tests @premalad and @tosser23

You both have the same issue, I know exactly where the issue is but for some reason I cannot simulate that issue, even using the same powershell version, az cli version and path.

Can you run the following sequence of commands one by one, so we can investigate that further?

$Modules = Get-ChildItem -Path ('C:\3.1.35\ARI-main\Modules\*.ps1') -Recurse
foreach ($Module in $Modules) {}
$ModuleName = $Module.name.replace('.ps1','')
Write-Host $ModuleName
$ModuleResourceCount = $SmaResources[$ModuleName].count
Write-Host $ModuleResourceCount

IMPORTANT: You must run the commands after the ARI script was ran (we need some variables to be populated by the script to check this)

tosser23 commented 2 months ago

@Claudio-Merola you wrote 3.1.35 but I guess you meat your latest version 3.1.36. Anyhow

PS C:\3.1.36\ARI-main> $Modules = Get-ChildItem -Path ('C:\3.1.36\ARI-main\Modules*.ps1') -Recurse PS C:\3.1.36\ARI-main> foreach ($Module in $Modules) {} PS C:\3.1.36\ARI-main> $ModuleName = $Module.name.replace('.ps1','') PS C:\3.1.36\ARI-main> Write-Host $ModuleName VMDisk PS C:\3.1.36\ARI-main> $ModuleResourceCount = $SmaResources[$ModuleName].count PS C:\3.1.36\ARI-main> Write-Host $ModuleResourceCount 0 PS C:\3.1.36\ARI-main>

Claudio-Merola commented 2 months ago

Thanks for the response @tosser23, now I was able to replicate the issue.

Can you try the version 3.1.37?

tosser23 commented 2 months ago

@Claudio-Merola EUREKA!!!! It's now working for me. Now the painstaking job of checking azure portal resources against your inventory. That would take me quite a while hence I won't disturb you for at least 96 hours! :) THANK YOU BIG TIME for all your effort beppe

premalad commented 2 months ago

@Claudio-Merola Truly impressive "it's working". Thanks a million for the fantastic effort mate! Need some time to vet through and will revert if there are any gaps that need fine tuning.