AsBuiltReport / AsBuiltReport.Microsoft.Azure

Repository for AsBuiltReport Microsoft Azure module
MIT License
11 stars 11 forks source link

New-AsBuiltReport: You cannot call a method on a null-valued expression #16

Open bramweja opened 1 month ago

bramweja commented 1 month ago

Bug description

When I attempt to run the application I get the following error:

New-AsBuiltReport: You cannot call a method on a null-valued expression

No report is produced

Command-line input

New-AsBuiltReport -Report Microsoft.Azure -Target 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx' -MFA -Format Html,Word -OutputFolderPath 'C:\asbuilt\reports' -Timestamp

Steps to reproduce

Account is Global Administrator

AsBuiltReport.Core v1.4.0 AsBuiltReport.Microsoft.Azure v1.6.0 Windows PowerShell v7.4.3

Expected behaviour

As built report to be produced

Screenshots

image

Operating System

Windows 11

PowerShell Version

PSVersion 7.4.3 PSEdition Core GitCommitId 7.4.3 OS Microsoft Windows 10.0.22631 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

PowerShell Modules

AsBuiltReport.Core 1.4.0 AsBuiltReport.Microsoft.Azure 0.1.6 Az 12.0.0 Az 11.2.0 PScribo 0.10.0

Additional Context

No response

Before submitting

tpcarman commented 1 month ago

Can you please add the Verbose parameter to the command-line input and run again? Please share the output.

ShaneFromIT commented 1 week ago

@tpcarman is this what you're looking for? VERBOSE: As Built Report configuration file not saved. VERBOSE: Config.Report.Author = Shane Wamsley VERBOSE: Config.UserFolder.Path = VERBOSE: Config.Company.FullName = VERBOSE: Config.Company.Contact = VERBOSE: Config.Company.Phone = VERBOSE: Config.Company.Email = VERBOSE: Config.Company.ShortName = VERBOSE: Config.Company.Address = VERBOSE: Config.Email.Port = VERBOSE: Config.Email.Credentials = VERBOSE: Config.Email.Server = VERBOSE: Config.Email.To = VERBOSE: Config.Email.From = VERBOSE: Config.Email.UseSSL = VERBOSE: Config.Email.Body = VERBOSE: Populating RepositorySourceLocation property for module AsBuiltReport.Core. VERBOSE: Loading module from path 'C:\Users\username\Documents\WindowsPowerShell\Modules\AsBuiltReport.Core\1.4.0\AsBuiltReport.Core.psm1'. VERBOSE: Populating RepositorySourceLocation property for module AsBuiltReport.Microsoft.Azure. VERBOSE: Loading module from path 'C:\Users\username\Documents\WindowsPowerShell\Modules\AsBuiltReport.Microsoft.Azure\0.1.6\AsBuiltReport.Microsoft.Azur e.psm1'. VERBOSE: Loading AsBuiltReport.Microsoft.Azure report configuration file from path 'C:\Users\username\OneDrive - COMUNET PTY LTD\Codan\Asbuilt\AsBuiltReport.Microsoft.Azure.json'. VERBOSE: Setting report filename to 'Microsoft Azure As Built Report'. VERBOSE: Populating RepositorySourceLocation property for module AsBuiltReport.Core. VERBOSE: Loading module from path 'C:\Users\username\Documents\WindowsPowerShell\Modules\AsBuiltReport.Core\1.4.0\AsBuiltReport.Core.psm1'. WARNING: [ 13:27:18:599 ] [ Module ] - AsBuiltReport.Core 1.4.0 is currently installed. VERBOSE: [ 13:27:20:464 ] [ Document ] - Document 'Microsoft Azure As Built Report' processing started. VERBOSE: [ 13:27:20:498 ] [ Document ] - Please wait while the Microsoft Azure As Built Report is being generated. VERBOSE: [ 13:27:20:502 ] [ Document ] - Executing report style script from path 'C:\Users\username\Documents\WindowsPowerShell\Modules\AsBuiltReport.Core\1.4.0\AsBuiltReport.Core.Style.ps1'. VERBOSE: [ 13:27:20:508 ] [ Document ] - Setting global document options. VERBOSE: [ 13:27:20:509 ] [ Document ] - Enabling section/heading numbering. VERBOSE: [ 13:27:20:511 ] [ Document ] - Setting default font(s) to 'Segoe Ui'. VERBOSE: [ 13:27:20:512 ] [ Document ] - Setting page top margin to '25.05'mm. VERBOSE: [ 13:27:20:513 ] [ Document ] - Setting page right margin to '25.05'mm. VERBOSE: [ 13:27:20:514 ] [ Document ] - Setting page bottom margin to '25.05'mm. VERBOSE: [ 13:27:20:516 ] [ Document ] - Setting page left margin to '25.05'mm. VERBOSE: [ 13:27:20:518 ] [ Document ] - Setting page size to 'A4'. VERBOSE: [ 13:27:20:520 ] [ Document ] - Setting page orientation to 'Portrait'. VERBOSE: [ 13:27:20:523 ] [ Document ] - Setting page height to '297'mm. VERBOSE: [ 13:27:20:525 ] [ Document ] - Setting page width to '210'mm. VERBOSE: [ 13:27:20:528 ] [ Document ] - Setting document style 'Title'. VERBOSE: [ 13:27:20:532 ] [ Document ] - Setting document style 'Title2'. VERBOSE: [ 13:27:20:536 ] [ Document ] - Setting document style 'Title3'. VERBOSE: [ 13:27:20:539 ] [ Document ] - Setting document style 'Heading1'. VERBOSE: [ 13:27:20:542 ] [ Document ] - Setting document style 'Heading2'. VERBOSE: [ 13:27:20:544 ] [ Document ] - Setting document style 'Heading3'. VERBOSE: [ 13:27:20:547 ] [ Document ] - Setting document style 'Heading4'. VERBOSE: [ 13:27:20:552 ] [ Document ] - Setting document style 'NOTOCHeading4'. VERBOSE: [ 13:27:20:556 ] [ Document ] - Setting document style 'Heading5'. VERBOSE: [ 13:27:20:558 ] [ Document ] - Setting document style 'NOTOCHeading5'. VERBOSE: [ 13:27:20:560 ] [ Document ] - Setting document style 'Heading6'. VERBOSE: [ 13:27:20:565 ] [ Document ] - Setting document style 'NOTOCHeading6'. VERBOSE: [ 13:27:20:567 ] [ Document ] - Setting document style 'NOTOCHeading7'. VERBOSE: [ 13:27:20:569 ] [ Document ] - Setting document style 'Normal'. VERBOSE: [ 13:27:20:572 ] [ Document ] - Setting document style 'Header'. VERBOSE: [ 13:27:20:574 ] [ Document ] - Setting document style 'Footer'. VERBOSE: [ 13:27:20:577 ] [ Document ] - Setting document style 'TOC'. VERBOSE: [ 13:27:20:580 ] [ Document ] - Setting document style 'TableDefaultHeading'. VERBOSE: [ 13:27:20:583 ] [ Document ] - Setting document style 'TableDefaultRow'. VERBOSE: [ 13:27:20:586 ] [ Document ] - Setting document style 'Critical'. VERBOSE: [ 13:27:20:591 ] [ Document ] - Setting document style 'Warning'. VERBOSE: [ 13:27:20:595 ] [ Document ] - Setting document style 'Info'. VERBOSE: [ 13:27:20:599 ] [ Document ] - Setting document style 'OK'. VERBOSE: [ 13:27:20:602 ] [ Document ] - Setting document style 'Caption'. VERBOSE: [ 13:27:20:605 ] [ Document ] - Setting table style 'TableDefault'. VERBOSE: [ 13:27:20:608 ] [ Document ] - Setting table style 'Borderless'. VERBOSE: [ 13:27:20:611 ] [ Document ] - Processing document header started. VERBOSE: [ 13:27:20:614 ] [ Document ] - Processing paragraph 'Microsoft Azure As Built Report - v1.0'. VERBOSE: [ 13:27:20:617 ] [ Document ] - Processing document header completed. VERBOSE: [ 13:27:20:619 ] [ Document ] - Processing document footer started. VERBOSE: [ 13:27:20:621 ] [ Document ] - Processing paragraph 'Page <!# PageNumber #!>'. VERBOSE: [ 13:27:20:624 ] [ Document ] - Processing document footer completed. VERBOSE: [ 13:27:20:628 ] [ Document ] - Processing blank line. VERBOSE: [ 13:27:20:630 ] [ Document ] - Processing image 'AsBuiltReport Logo'. VERBOSE: [ 13:27:20:636 ] [ Document ] - Processing blank line. VERBOSE: [ 13:27:20:639 ] [ Document ] - Processing paragraph 'Microsoft Azure As Built Report'. VERBOSE: [ 13:27:20:641 ] [ Document ] - Processing blank line. VERBOSE: [ 13:27:20:643 ] [ Document ] - Processing table 'Cover Page'. VERBOSE: [ 13:27:20:645 ] [ Document ] - Processing page break. VERBOSE: [ 13:27:20:646 ] [ Document ] - Processing table of contents 'Table of Contents'. VERBOSE: [ 13:27:20:648 ] [ Document ] - Processing page break. WARNING: [ 13:27:20:649 ] [ MFA ] - MFA is enabled, please check for MFA authentication windows to generate your report. VERBOSE: [ 13:27:20:651 ] [ Module ] - Please refer to the AsBuiltReport.Microsoft.Azure GitHub website for more detailed information about this project. VERBOSE: [ 13:27:20:652 ] [ Module ] - Do not forget to update your report configuration file after each new version release: https://www.asbuiltreport.com/user-guide/new-asbuiltreportconfig/ VERBOSE: [ 13:27:20:655 ] [ Module ] - Documentation: https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.Azure VERBOSE: [ 13:27:20:657 ] [ Module ] - Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.Azure/issues VERBOSE: [ 13:27:20:736 ] [ Module ] - AsBuiltReport.Microsoft.Azure 0.1.6 is currently installed. VERBOSE: [ 13:27:22:124 ] [ Document ] - Connecting to Azure Tenant ID 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'. Please select the account you want to login with.

Retrieving subscriptions for the selection... VERBOSE: [ 13:28:00:876 ] [ Document ] - Processing section 'xxxxx' started. VERBOSE: [ 13:28:00:883 ] [ Document ] - Collecting Azure Tenant information. VERBOSE: [ 13:28:00:892 ] [ Document ] - Processing table 'Tenant - xxxxx'. VERBOSE: [ 13:28:00:896 ] [ Document ] - Processing section 'Subscriptions' started. VERBOSE: [ 13:28:00:901 ] [ Document ] - Collecting Azure Subscription information. VERBOSE: [ 13:28:00:918 ] [ Document ] - Processing paragraph 'An Azure subscription is a logical c[..]'. VERBOSE: [ 13:28:00:921 ] [ Document ] - Processing blank line. VERBOSE: [ 13:28:00:924 ] [ Document ] - Processing paragraph 'The following table summarises the s[..]'. VERBOSE: [ 13:28:00:925 ] [ Document ] - Processing blank line. VERBOSE: [ 13:28:00:928 ] [ Document ] - Processing table 'Subscriptions - xxxx'. VERBOSE: [ 13:28:00:932 ] [ Document ] - Processing section 'xxxx Network Hub' started. VERBOSE: [ 13:28:00:934 ] [ Document ] - Setting Azure context to Subscription ID 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.Id'. VERBOSE: [ 13:28:01:464 ] [ Document ] - Collecting Azure Policy Assignment information. VERBOSE: [ 13:28:01:865 ] [ Document ] - Processing section 'Policy Assignments' started. New-AsBuiltReport : You cannot call a method on a null-valued expression. At line:1 char:1

bramweja commented 1 week ago

Can you please add the Verbose parameter to the command-line input and run again? Please share the output.


< As Built Report Configuration >

Would you like to save the As Built Report configuration file? (y/n): y Enter a name for the As Built Report configuration file [AsBuiltReport]: report Enter the path to save the As Built Report configuration file [C:\asbuilt\reports]: C:\asbuilt\reports VERBOSE: Saving As Built Report configuration file 'report.json' to path 'C:\asbuilt\reports'. VERBOSE: Config.Report.Author =XXXXX VERBOSE: Config.UserFolder.Path = C:\asbuilt\reports VERBOSE: Config.Company.FullName = VERBOSE: Config.Company.Contact = VERBOSE: Config.Company.Phone = VERBOSE: Config.Company.Email = VERBOSE: Config.Company.ShortName = VERBOSE: Config.Company.Address = VERBOSE: Config.Email.Port = VERBOSE: Config.Email.Credentials = VERBOSE: Config.Email.Server = VERBOSE: Config.Email.To = VERBOSE: Config.Email.From = VERBOSE: Config.Email.UseSSL = VERBOSE: Config.Email.Body = VERBOSE: Populating RepositorySourceLocation property for module AsBuiltReport.Core. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Core\1.4.0\AsBuiltReport.Core.psm1'. VERBOSE: Populating RepositorySourceLocation property for module AsBuiltReport.Microsoft.Azure. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Microsoft.Azure\0.1.6\AsBuiltReport.Microsoft.Azure.psm1'. VERBOSE: Loading report configuration file from path 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Microsoft.Azure\0.1.6\AsBuiltReport.Microsoft.Azure.json'. VERBOSE: Setting report filename to 'Microsoft Azure As Built Report - 2024-08-01_08.57.22'. VERBOSE: Populating RepositorySourceLocation property for module AsBuiltReport.Core. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Core\1.4.0\AsBuiltReport.Core.psm1'. WARNING: [ 08:57:22:434 ] [ Module ] - AsBuiltReport.Core 1.4.0 is currently installed. VERBOSE: [ 08:57:25:123 ] [ Document ] - Document 'Microsoft Azure As Built Report - 2024-08-01_08.57.22' processing started. VERBOSE: [ 08:57:25:176 ] [ Document ] - Please wait while the Microsoft Azure As Built Report is being generated. VERBOSE: [ 08:57:25:179 ] [ Document ] - Executing report style script from path 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Core\1.4.0\AsBuiltReport.Core.Style.ps1'. VERBOSE: [ 08:57:25:187 ] [ Document ] - Setting global document options. VERBOSE: [ 08:57:25:187 ] [ Document ] - Enabling section/heading numbering. VERBOSE: [ 08:57:25:187 ] [ Document ] - Setting default font(s) to 'Segoe Ui'. VERBOSE: [ 08:57:25:187 ] [ Document ] - Setting page top margin to '25.05'mm. VERBOSE: [ 08:57:25:187 ] [ Document ] - Setting page right margin to '25.05'mm. VERBOSE: [ 08:57:25:202 ] [ Document ] - Setting page bottom margin to '25.05'mm. VERBOSE: [ 08:57:25:202 ] [ Document ] - Setting page left margin to '25.05'mm. VERBOSE: [ 08:57:25:218 ] [ Document ] - Setting page size to 'A4'. VERBOSE: [ 08:57:25:218 ] [ Document ] - Setting page orientation to 'Portrait'. VERBOSE: [ 08:57:25:218 ] [ Document ] - Setting page height to '297'mm. VERBOSE: [ 08:57:25:218 ] [ Document ] - Setting page width to '210'mm. VERBOSE: [ 08:57:25:218 ] [ Document ] - Setting document style 'Title'. VERBOSE: [ 08:57:25:234 ] [ Document ] - Setting document style 'Title2'. VERBOSE: [ 08:57:25:234 ] [ Document ] - Setting document style 'Title3'. VERBOSE: [ 08:57:25:241 ] [ Document ] - Setting document style 'Heading1'. VERBOSE: [ 08:57:25:250 ] [ Document ] - Setting document style 'Heading2'. VERBOSE: [ 08:57:25:250 ] [ Document ] - Setting document style 'Heading3'. VERBOSE: [ 08:57:25:250 ] [ Document ] - Setting document style 'Heading4'. VERBOSE: [ 08:57:25:250 ] [ Document ] - Setting document style 'NOTOCHeading4'. VERBOSE: [ 08:57:25:250 ] [ Document ] - Setting document style 'Heading5'. VERBOSE: [ 08:57:25:250 ] [ Document ] - Setting document style 'NOTOCHeading5'. VERBOSE: [ 08:57:25:265 ] [ Document ] - Setting document style 'Heading6'. VERBOSE: [ 08:57:25:265 ] [ Document ] - Setting document style 'NOTOCHeading6'. VERBOSE: [ 08:57:25:272 ] [ Document ] - Setting document style 'NOTOCHeading7'. VERBOSE: [ 08:57:25:276 ] [ Document ] - Setting document style 'Normal'. VERBOSE: [ 08:57:25:281 ] [ Document ] - Setting document style 'Header'. VERBOSE: [ 08:57:25:281 ] [ Document ] - Setting document style 'Footer'. VERBOSE: [ 08:57:25:281 ] [ Document ] - Setting document style 'TOC'. VERBOSE: [ 08:57:25:281 ] [ Document ] - Setting document style 'TableDefaultHeading'. VERBOSE: [ 08:57:25:281 ] [ Document ] - Setting document style 'TableDefaultRow'. VERBOSE: [ 08:57:25:281 ] [ Document ] - Setting document style 'Critical'. VERBOSE: [ 08:57:25:297 ] [ Document ] - Setting document style 'Warning'. VERBOSE: [ 08:57:25:304 ] [ Document ] - Setting document style 'Info'. VERBOSE: [ 08:57:25:304 ] [ Document ] - Setting document style 'OK'. VERBOSE: [ 08:57:25:313 ] [ Document ] - Setting document style 'Caption'. VERBOSE: [ 08:57:25:313 ] [ Document ] - Setting table style 'TableDefault'. VERBOSE: [ 08:57:25:313 ] [ Document ] - Setting table style 'Borderless'. VERBOSE: [ 08:57:25:313 ] [ Document ] - Processing document header started. VERBOSE: [ 08:57:25:329 ] [ Document ] - Processing paragraph 'Microsoft Azure As Built Report - v1.0'. VERBOSE: [ 08:57:25:345 ] [ Document ] - Processing document header completed. VERBOSE: [ 08:57:25:345 ] [ Document ] - Processing document footer started. VERBOSE: [ 08:57:25:345 ] [ Document ] - Processing paragraph 'Page <!# PageNumber #!>'. VERBOSE: [ 08:57:25:345 ] [ Document ] - Processing document footer completed. VERBOSE: [ 08:57:25:345 ] [ Document ] - Processing blank line. VERBOSE: [ 08:57:25:360 ] [ Document ] - Processing image 'AsBuiltReport Logo'. VERBOSE: [ 08:57:25:376 ] [ Document ] - Processing blank line. VERBOSE: [ 08:57:25:376 ] [ Document ] - Processing paragraph 'Microsoft Azure As Built Report'. VERBOSE: [ 08:57:25:376 ] [ Document ] - Processing blank line. VERBOSE: [ 08:57:25:376 ] [ Document ] - Processing table 'Cover Page'. VERBOSE: [ 08:57:25:392 ] [ Document ] - Processing page break. VERBOSE: [ 08:57:25:398 ] [ Document ] - Processing table of contents 'Table of Contents'. VERBOSE: [ 08:57:25:398 ] [ Document ] - Processing page break. WARNING: [ 08:57:25:408 ] [ MFA ] - MFA is enabled, please check for MFA authentication windows to generate your report. VERBOSE: [ 08:57:25:408 ] [ Module ] - Please refer to the AsBuiltReport.Microsoft.Azure GitHub website for more detailed information about this project. VERBOSE: [ 08:57:25:408 ] [ Module ] - Do not forget to update your report configuration file after each new version release: https://www.asbuiltreport.com/user-guide/new-asbuiltreportconfig/ VERBOSE: [ 08:57:25:408 ] [ Module ] - Documentation: https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.Azure VERBOSE: [ 08:57:25:408 ] [ Module ] - Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.Azure/issues VERBOSE: [ 08:57:25:476 ] [ Module ] - AsBuiltReport.Microsoft.Azure 0.1.6 is currently installed. VERBOSE: [ 08:57:27:091 ] [ Document ] - Connecting to Azure Tenant ID 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'. Please select the account you want to login with.

Retrieving subscriptions for the selection... WARNING: To override which subscription Connect-AzAccount selects by default, use Update-AzConfig -DefaultSubscriptionForLogin 00000000-0000-0000-0000-000000000000. Go to https://go.microsoft.com/fwlink/?linkid=2200610 for more information. [Tenant and subscription selection]

No Subscription name Subscription ID Tenant name


[1] Azure subscription 1 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx [2] Azure Subscription 2072740 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx [3] * xxx_AZURE xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

The default is marked with an *; the default tenant is '' and subscription is 'xxx_AZURE (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)'.

Select a tenant and subscription (type a number or Enter to accept default): 3

Subscription name Tenant name


xxx_AZURE xxxxxxxx-xxxx-xxxx-xxxx... [Announcements] With the new Azure PowerShell login experience, you can select the subscription you want to use more easily. Learn more about it and its configuration at https://go.microsoft.com/fwlink/?linkid=2271909.

If you encounter any problem, please open an issue at: https://aka.ms/azpsissue

VERBOSE: [ 08:58:40:131 ] [ Document ] - Processing section 'ACME LIMITED.' started. VERBOSE: [ 08:58:40:135 ] [ Document ] - Collecting Azure Tenant information. VERBOSE: [ 08:58:40:140 ] [ Document ] - Processing table 'Tenant - ACME LIMITED.'. VERBOSE: [ 08:58:40:146 ] [ Document ] - Processing section 'Subscriptions' started. VERBOSE: [ 08:58:40:150 ] [ Document ] - Collecting Azure Subscription information. VERBOSE: [ 08:58:40:153 ] [ Document ] - Processing paragraph 'An Azure subscription is a logical c[..]'. VERBOSE: [ 08:58:40:158 ] [ Document ] - Processing blank line. VERBOSE: [ 08:58:40:161 ] [ Document ] - Processing paragraph 'The following table summarises the s[..]'. VERBOSE: [ 08:58:40:165 ] [ Document ] - Processing blank line. VERBOSE: [ 08:58:40:168 ] [ Document ] - Processing table 'Subscriptions - ACME LIMITED.'. VERBOSE: [ 08:58:40:173 ] [ Document ] - Processing section 'Azure subscription 1' started. VERBOSE: [ 08:58:40:178 ] [ Document ] - Setting Azure context to Subscription ID 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.Id'. VERBOSE: [ 08:58:40:635 ] [ Document ] - Collecting Azure Policy Assignment information. VERBOSE: [ 08:58:40:934 ] [ Document ] - AvailabilitySet InfoLevel set at 1. VERBOSE: [ 08:58:41:318 ] [ Document ] - Bastion InfoLevel set at 1. VERBOSE: [ 08:58:41:655 ] [ Document ] - ExpressRoute InfoLevel set at 1. VERBOSE: [ 08:58:42:033 ] [ Document ] - Firewall InfoLevel set at 1. VERBOSE: [ 08:58:42:387 ] [ Document ] - IPGroup InfoLevel set at 1. VERBOSE: [ 08:58:42:726 ] [ Document ] - KeyVault InfoLevel set at 1. VERBOSE: [ 08:58:43:127 ] [ Document ] - LoadBalancer InfoLevel set at 1. VERBOSE: [ 08:58:43:467 ] [ Document ] - VirtualNetwork InfoLevel set at 1. VERBOSE: [ 08:58:43:827 ] [ Document ] - NetworkSecurityGroup InfoLevel set at 1. VERBOSE: [ 08:58:44:163 ] [ Document ] - RouteTable InfoLevel set at 1. VERBOSE: [ 08:58:44:522 ] [ Document ] - VM InfoLevel set at 1. VERBOSE: [ 08:58:44:882 ] [ Document ] - RecoveryServicesVault InfoLevel set at 1. VERBOSE: [ 08:58:45:358 ] [ Document ] - SiteRecovery InfoLevel set at 1. VERBOSE: [ 08:58:45:835 ] [ Document ] - StorageAccount InfoLevel set at 1. VERBOSE: [ 08:58:46:183 ] [ Document ] - Processing section 'Azure subscription 1' completed. VERBOSE: [ 08:58:46:183 ] [ Document ] - Processing section 'Azure Subscription xxxxxx' started. VERBOSE: [ 08:58:46:183 ] [ Document ] - Setting Azure context to Subscription ID 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.Id'. VERBOSE: [ 08:58:46:585 ] [ Document ] - Collecting Azure Policy Assignment information. VERBOSE: [ 08:58:46:741 ] [ Document ] - AvailabilitySet InfoLevel set at 1. VERBOSE: [ 08:58:47:056 ] [ Document ] - Bastion InfoLevel set at 1. VERBOSE: [ 08:58:47:397 ] [ Document ] - ExpressRoute InfoLevel set at 1. VERBOSE: [ 08:58:47:741 ] [ Document ] - Firewall InfoLevel set at 1. VERBOSE: [ 08:58:48:085 ] [ Document ] - IPGroup InfoLevel set at 1. VERBOSE: [ 08:58:48:406 ] [ Document ] - KeyVault InfoLevel set at 1. VERBOSE: [ 08:58:48:835 ] [ Document ] - LoadBalancer InfoLevel set at 1. VERBOSE: [ 08:58:49:343 ] [ Document ] - VirtualNetwork InfoLevel set at 1. VERBOSE: [ 08:58:49:663 ] [ Document ] - NetworkSecurityGroup InfoLevel set at 1. VERBOSE: [ 08:58:50:088 ] [ Document ] - RouteTable InfoLevel set at 1. VERBOSE: [ 08:58:50:436 ] [ Document ] - VM InfoLevel set at 1. VERBOSE: [ 08:58:50:786 ] [ Document ] - RecoveryServicesVault InfoLevel set at 1. VERBOSE: [ 08:58:51:244 ] [ Document ] - SiteRecovery InfoLevel set at 1. VERBOSE: [ 08:58:51:679 ] [ Document ] - StorageAccount InfoLevel set at 1. VERBOSE: [ 08:58:52:022 ] [ Document ] - Processing section 'Azure Subscription XXXX' completed. VERBOSE: [ 08:58:52:038 ] [ Document ] - Processing section 'xxx_AZURE' started. VERBOSE: [ 08:58:52:038 ] [ Document ] - Setting Azure context to Subscription ID 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.Id'. VERBOSE: [ 08:58:52:370 ] [ Document ] - Collecting Azure Policy Assignment information. New-AsBuiltReport : A parameter cannot be found that matches parameter name 'Depth'. At line:1 char:1

jobbio commented 1 week ago

I had a similar error and I had to set the policy, RecoveryServicesVault and Storage to 0 as I didn't have access with my current permissions on a client.

ShaneFromIT commented 1 week ago

I had a similar error and I had to set the policy, RecoveryServicesVault and Storage to 0 as I didn't have access with my current permissions on a client.

Cheers, yeah that fixed it. I removed Bastion,KeyVault,PolicyAssignment,RecoveryServicesVault & StorageAccount because I didn't need them right now and it worked perfectly.