-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excel Report not being generated #26
Comments
Check the version of the az resource graph that's installed along with az cli az --version (This is my output) Extensions: If it's not at 2.1.0 then remove that with az extension remove --name -resource-graph Now, install the latest az extension add --name resource-graph Try to run the script again |
I pulled down the latest version of this script and I can confirm the same errors -
Line | WARNING: Failed autosizing columns of worksheet 'Subscriptions': You cannot call a method on a null-valued expression. |
I had checked the versions and it seemed fine, I have just updated to use Powershell 7, and now it´s working... |
Can you please help me?
When I run the script the Excel File is not generated. I don't know if it is a problem with the ImportExcel Module.
The script output is below:
To include Security Center details in the report, use <-SecurityCenter> parameter.
ERROR: argument --subscription/-s: expected one argument
TRY THIS:
az account set --subscription mysubscription
Set a subscription to be the current active subscription. (autogenerated)
az account list
Get a list of subscriptions for the logged in account. (autogenerated)
az account show
Get the details of a subscription. (autogenerated)
https://docs.microsoft.com/en-US/cli/azure/account#az_account_set
Read more about the command in reference docs
The property 'HorizontalAlignment' cannot be found on this object. Verify that the property exists and can be set.
At C:\Documents\WindowsPowerShell\Modules\ImportExcel\7.2.2\Public\Set-ExcelRange.ps1:107 char:17
The property 'Format' cannot be found on this object. Verify that the property exists and can be set.
At C:\Documents\WindowsPowerShell\Modules\ImportExcel\7.2.2\Public\Set-ExcelRange.ps1:128 char:17
WARNING: Failed autosizing columns of worksheet 'Subscriptions': You cannot call a method on a null-valued expression.
WARNING: Failed adding PivotTable 'P1': Index operation failed; the array index evaluated to null.
WARNING: Failed adding chart for pivotable 'P1': Cannot bind argument to parameter 'PivotTable' because it is null.
Report Complete. Total Runtime was: .26 Minutes
Total Resources: 0
Total Advisories: 309
Excel file saved at: AzureResourceInventory_Report_2021-08-14_23_34.xlsx
PS C:\Documents\Scripts\MyAzureScripts\ARI> az account list --output json
[
{
The text was updated successfully, but these errors were encountered: