Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AzureResourceInventory.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AzureResourceInventory.psm1'

# Version number of this module.
ModuleVersion = '3.6.12'
ModuleVersion = '3.6.13'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
16 changes: 8 additions & 8 deletions Modules/Private/1.ExtractionFunctions/Get-ARIAPIResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ https://github.com/microsoft/ARI/Modules/Private/1.ExtractionFunctions/Get-ARIAP
This PowerShell Module is part of Azure Resource Inventory (ARI).

.NOTES
Version: 3.6.0
Version: 3.6.13
First Release Date: 15th Oct, 2024
Authors: Claudio Merola
#>
Expand Down Expand Up @@ -75,7 +75,7 @@ function Get-ARIAPIResources {
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Getting ResourceHealth Events')
$url = ('https://' + $AzURL + '/subscriptions/' + $Sub + '/providers/Microsoft.ResourceHealth/events?api-version=2022-10-01&queryStartTime=' + $ResourceHealthHistoryDate)
try {
$ResourceHealth = Invoke-RestMethod -Uri $url -Headers $header -Method GET
$ResourceHealth = Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false
}
catch {
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Error: ' + $_.Exception.Message)
Expand All @@ -88,7 +88,7 @@ function Get-ARIAPIResources {
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Getting Managed Identities')
$url = ('https://' + $AzURL + '/subscriptions/' + $Sub + '/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31')
try {
$Identities = Invoke-RestMethod -Uri $url -Headers $header -Method GET
$Identities = Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false
}
catch {
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Error: ' + $_.Exception.Message)
Expand All @@ -100,7 +100,7 @@ function Get-ARIAPIResources {
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Getting Advisor Score')
$url = ('https://' + $AzURL + '/subscriptions/' + $Sub + '/providers/Microsoft.Advisor/advisorScore?api-version=2023-01-01')
try {
$ADVScore = Invoke-RestMethod -Uri $url -Headers $header -Method GET
$ADVScore = Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false
}
catch {
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Error: ' + $_.Exception.Message)
Expand All @@ -112,7 +112,7 @@ function Get-ARIAPIResources {
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Getting VM Reservation Recommendation')
$url = ('https://' + $AzURL + '/subscriptions/' + $Sub + '/providers/Microsoft.Consumption/reservationRecommendations?api-version=2023-05-01')
try {
$ReservationRecon = Invoke-RestMethod -Uri $url -Headers $header -Method GET
$ReservationRecon = Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false
}
catch {
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Error: ' + $_.Exception.Message)
Expand All @@ -126,13 +126,13 @@ function Get-ARIAPIResources {
#Policies
try {
$url = ('https://'+ $AzURL +'/subscriptions/'+$sub+'/providers/Microsoft.PolicyInsights/policyStates/latest/summarize?api-version=2019-10-01')
$PolicyAssign = (Invoke-RestMethod -Uri $url -Headers $header -Method POST).value
$PolicyAssign = (Invoke-RestMethod -Uri $url -Headers $header -Method POST -Debug:$false).value
Start-Sleep -Milliseconds 200
$url = ('https://'+ $AzURL +'/subscriptions/'+$sub+'/providers/Microsoft.Authorization/policySetDefinitions?api-version=2023-04-01')
$PolicySetDef = (Invoke-RestMethod -Uri $url -Headers $header -Method GET).value
$PolicySetDef = (Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false).value
Start-Sleep -Milliseconds 200
$url = ('https://'+ $AzURL +'/subscriptions/'+$sub+'/providers/Microsoft.Authorization/policyDefinitions?api-version=2023-04-01')
$PolicyDef = (Invoke-RestMethod -Uri $url -Headers $header -Method GET).value
$PolicyDef = (Invoke-RestMethod -Uri $url -Headers $header -Method GET -Debug:$false).value
}
catch {
Write-Debug ((get-date -Format 'yyyy-MM-dd_HH_mm_ss')+' - '+'Error: ' + $_.Exception.Message)
Expand Down
5 changes: 3 additions & 2 deletions Modules/Public/InventoryModules/Storage/StorageAccounts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https://github.com/microsoft/ARI/Modules/Public/InventoryModules/Storage/Storage
This powershell Module is part of Azure Resource Inventory (ARI)

.NOTES
Version: 3.6.0
Version: 3.6.13
First Release Date: 19th November, 2020
Authors: Claudio Merola and Renato Gregio

Expand Down Expand Up @@ -81,6 +81,7 @@ If ($Task -eq 'Processing') {
$InfrastructureEncryption = if($data.encryption.requireInfrastructureEncryption -eq "True"){$true}else{$false}

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

if ($data.azureFilesIdentityBasedAuthentication.directoryServiceOptions -eq 'None')
{
Expand Down Expand Up @@ -151,7 +152,7 @@ If ($Task -eq 'Processing') {
'SKU' = $1.sku.name;
'Tier' = $1.sku.tier;
'Storage Account Kind' = $1.kind;
'Used Capacity (GB)' = [math]::Round($StorageUsedCapacity,2);
'Used Capacity (GB)' = $StorageUsedCapacity;
'Secure Transfer Required' = $data.supportsHttpsTrafficOnly;
'Allow Blob Anonymous Access' = $BlobAccess;
'Minimum TLS Version' = $TLSv;
Expand Down
3 changes: 2 additions & 1 deletion docs/advanced/automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ In the "Packages" pane of your Runtime Environment, import the following modules
4. Az.Accounts
5. Az.Storage
6. Az.Compute
7. Az.CostManagement (only if using the `-IncludeCosts` parameter)
7. Az.Monitor
8. Az.CostManagement (only if using the `-IncludeCosts` parameter)

### Step 6: Create a PowerShell Runbook

Expand Down
Loading