@@ -12,7 +12,7 @@ https://github.com/microsoft/ARI/Modules/Private/1.ExtractionFunctions/Get-ARIAP
1212This PowerShell Module is part of Azure Resource Inventory (ARI).
1313
1414. NOTES
15- Version: 3.6.0
15+ Version: 3.6.13
1616First Release Date: 15th Oct, 2024
1717Authors: 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 )
0 commit comments