Skip to content

Commit f18fa84

Browse files
Merge pull request #394 from microsoft/3.6.13
3.6.13
2 parents e04815d + 0f2b98a commit f18fa84

4 files changed

Lines changed: 14 additions & 12 deletions

File tree

AzureResourceInventory.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AzureResourceInventory.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '3.6.12'
15+
ModuleVersion = '3.6.13'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()

Modules/Private/1.ExtractionFunctions/Get-ARIAPIResources.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ https://github.com/microsoft/ARI/Modules/Private/1.ExtractionFunctions/Get-ARIAP
1212
This PowerShell Module is part of Azure Resource Inventory (ARI).
1313
1414
.NOTES
15-
Version: 3.6.0
15+
Version: 3.6.13
1616
First Release Date: 15th Oct, 2024
1717
Authors: Claudio Merola
1818
#>
@@ -75,7 +75,7 @@ function Get-ARIAPIResources {
7575
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Getting ResourceHealth Events')
7676
$url = ('https://' + $AzURL + '/subscriptions/' + $Sub + '/providers/Microsoft.ResourceHealth/events?api-version=2022-10-01&queryStartTime=' + $ResourceHealthHistoryDate)
7777
try {
78-
$ResourceHealth = Invoke-RestMethod -Uri $url -Headers $header -Method GET
78+
$ResourceHealth = Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false
7979
}
8080
catch {
8181
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Error: ' + $_.Exception.Message)
@@ -88,7 +88,7 @@ function Get-ARIAPIResources {
8888
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Getting Managed Identities')
8989
$url = ('https://' + $AzURL + '/subscriptions/' + $Sub + '/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31')
9090
try {
91-
$Identities = Invoke-RestMethod -Uri $url -Headers $header -Method GET
91+
$Identities = Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false
9292
}
9393
catch {
9494
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Error: ' + $_.Exception.Message)
@@ -100,7 +100,7 @@ function Get-ARIAPIResources {
100100
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Getting Advisor Score')
101101
$url = ('https://' + $AzURL + '/subscriptions/' + $Sub + '/providers/Microsoft.Advisor/advisorScore?api-version=2023-01-01')
102102
try {
103-
$ADVScore = Invoke-RestMethod -Uri $url -Headers $header -Method GET
103+
$ADVScore = Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false
104104
}
105105
catch {
106106
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Error: ' + $_.Exception.Message)
@@ -112,7 +112,7 @@ function Get-ARIAPIResources {
112112
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Getting VM Reservation Recommendation')
113113
$url = ('https://' + $AzURL + '/subscriptions/' + $Sub + '/providers/Microsoft.Consumption/reservationRecommendations?api-version=2023-05-01')
114114
try {
115-
$ReservationRecon = Invoke-RestMethod -Uri $url -Headers $header -Method GET
115+
$ReservationRecon = Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false
116116
}
117117
catch {
118118
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Error: ' + $_.Exception.Message)
@@ -126,13 +126,13 @@ function Get-ARIAPIResources {
126126
#Policies
127127
try {
128128
$url = ('https://'+ $AzURL +'/subscriptions/'+$sub+'/providers/Microsoft.PolicyInsights/policyStates/latest/summarize?api-version=2019-10-01')
129-
$PolicyAssign = (Invoke-RestMethod -Uri $url -Headers $header -Method POST).value
129+
$PolicyAssign = (Invoke-RestMethod -Uri $url -Headers $header -Method POST -Debug:$false).value
130130
Start-Sleep -Milliseconds 200
131131
$url = ('https://'+ $AzURL +'/subscriptions/'+$sub+'/providers/Microsoft.Authorization/policySetDefinitions?api-version=2023-04-01')
132-
$PolicySetDef = (Invoke-RestMethod -Uri $url -Headers $header -Method GET).value
132+
$PolicySetDef = (Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false).value
133133
Start-Sleep -Milliseconds 200
134134
$url = ('https://'+ $AzURL +'/subscriptions/'+$sub+'/providers/Microsoft.Authorization/policyDefinitions?api-version=2023-04-01')
135-
$PolicyDef = (Invoke-RestMethod -Uri $url -Headers $header -Method GET).value
135+
$PolicyDef = (Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false).value
136136
}
137137
catch {
138138
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Error: ' + $_.Exception.Message)

Modules/Public/InventoryModules/Storage/StorageAccounts.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ https://github.com/microsoft/ARI/Modules/Public/InventoryModules/Storage/Storage
1313
This powershell Module is part of Azure Resource Inventory (ARI)
1414
1515
.NOTES
16-
Version: 3.6.0
16+
Version: 3.6.13
1717
First Release Date: 19th November, 2020
1818
Authors: Claudio Merola and Renato Gregio
1919
@@ -81,6 +81,7 @@ If ($Task -eq 'Processing') {
8181
$InfrastructureEncryption = if($data.encryption.requireInfrastructureEncryption -eq "True"){$true}else{$false}
8282

8383
$StorageUsedCapacity = $StorageDetails.properties | Where-Object { $_.id -eq $1.id } | Select-Object -ExpandProperty CapacityGB
84+
$StorageUsedCapacity = if ($StorageUsedCapacity) {[math]::Round($StorageUsedCapacity,2)}else{$null}
8485

8586
if ($data.azureFilesIdentityBasedAuthentication.directoryServiceOptions -eq 'None')
8687
{
@@ -151,7 +152,7 @@ If ($Task -eq 'Processing') {
151152
'SKU' = $1.sku.name;
152153
'Tier' = $1.sku.tier;
153154
'Storage Account Kind' = $1.kind;
154-
'Used Capacity (GB)' = [math]::Round($StorageUsedCapacity,2);
155+
'Used Capacity (GB)' = $StorageUsedCapacity;
155156
'Secure Transfer Required' = $data.supportsHttpsTrafficOnly;
156157
'Allow Blob Anonymous Access' = $BlobAccess;
157158
'Minimum TLS Version' = $TLSv;

docs/advanced/automation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ In the "Packages" pane of your Runtime Environment, import the following modules
7676
4. Az.Accounts
7777
5. Az.Storage
7878
6. Az.Compute
79-
7. Az.CostManagement (only if using the `-IncludeCosts` parameter)
79+
7. Az.Monitor
80+
8. Az.CostManagement (only if using the `-IncludeCosts` parameter)
8081

8182
### Step 6: Create a PowerShell Runbook
8283

0 commit comments

Comments
 (0)