From a12969347db22cd78a7310e14226cba5061dcfe8 Mon Sep 17 00:00:00 2001 From: Claudio Merola Date: Wed, 7 Dec 2022 16:18:28 -0300 Subject: [PATCH] 2.3.14 --- AzureResourceInventory.ps1 | 15 +++++++-------- Modules/Containers/VMSS.ps1 | 22 ++++++++++++++-------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/AzureResourceInventory.ps1 b/AzureResourceInventory.ps1 index e11db55..7597c62 100644 --- a/AzureResourceInventory.ps1 +++ b/AzureResourceInventory.ps1 @@ -2,9 +2,9 @@ # # # * Azure Resource Inventory ( ARI ) Report Generator * # # # -# Version: 2.3.13 # +# Version: 2.3.14 # # # -# Date: 11/30/2022 # +# Date: 12/07/2022 # # # ########################################################################################## <# @@ -135,19 +135,18 @@ param ($TenantID, Write-Host " To ignore this use <-SkipAdvisory> parameter. " Write-Host "e.g. />./AzureResourceInventory.ps1 -TenantID -SubscriptionID -SkipAdvisory" Write-Host "" - Write-Host "Creating Visio Diagram :" - Write-Host "If you Want to create a Visio Diagram you need to use <-Diagram> parameter." - Write-Host "It's a pre-requisite to run in a Windows with Microsoft Visio Installed" - Write-Host " To include Security Center details in the report, use <-SecurityCenter> parameter. " + Write-Host "Creating Network Diagram :" + Write-Host " If you Want to create a Draw.io Diagram you need to use <-Diagram> parameter." + Write-Host " This feature only works on Windows O.S. " Write-Host "e.g. />./AzureResourceInventory.ps1 -TenantID -Diagram" Write-Host "" Write-Host "Using the latest modules :" Write-Host " You can use the latest modules. For this use <-Online> parameter." - Write-Host "It's a pre-requisite to have internet access for ARI GitHub repo" + Write-Host " It's a pre-requisite to have internet access for ARI GitHub repo" Write-Host "e.g. />./AzureResourceInventory.ps1 -TenantID -Online" Write-Host "" Write-Host "Running in Debug Mode :" - Write-Host "To run in a Debug Mode use <-Debug> parameter." + Write-Host " To run in a Debug Mode use <-Debug> parameter." Write-Host ".e.g. />/AzureResourceInventory.ps1 -TenantID -Debug" Write-Host "" } diff --git a/Modules/Containers/VMSS.ps1 b/Modules/Containers/VMSS.ps1 index c913769..6e0c6f0 100644 --- a/Modules/Containers/VMSS.ps1 +++ b/Modules/Containers/VMSS.ps1 @@ -13,7 +13,7 @@ https://github.com/microsoft/ARI/Modules/Compute/VMSS.ps1 This powershell Module is part of Azure Resource Inventory (ARI) .NOTES -Version: 2.2.0 +Version: 2.3.0 First Release Date: 19th November, 2020 Authors: Claudio Merola and Renato Gregio @@ -29,6 +29,8 @@ If ($Task -eq 'Processing') $vmss = $Resources | Where-Object {$_.TYPE -eq 'microsoft.compute/virtualmachinescalesets'} $AutoScale = $Resources | Where-Object {$_.TYPE -eq "microsoft.insights/autoscalesettings" -and $_.Properties.enabled -eq 'true'} + $AKS = $Resources | Where-Object {$_.TYPE -eq 'microsoft.containerservice/managedclusters'} + $SFC = $Resources | Where-Object {$_.TYPE -eq 'microsoft.servicefabric/clusters'} <######### Insert the resource Process here ########> @@ -41,6 +43,8 @@ If ($Task -eq 'Processing') $sub1 = $SUB | Where-Object { $_.id -eq $1.subscriptionId } $data = $1.PROPERTIES $OS = $data.virtualMachineProfile.storageProfile.osDisk.osType + $RelatedAKS = ($AKS | Where-Object {$_.properties.nodeResourceGroup -eq $1.resourceGroup}).Name + if([string]::IsNullOrEmpty($RelatedAKS)){$Related = ($SFC | Where-Object {$_.Properties.clusterEndpoint -in $1.properties.virtualMachineProfile.extensionProfile.extensions.properties.settings.clusterEndpoint}).Name}else{$Related = $RelatedAKS} $Scaling = ($AutoScale | Where-Object {$_.Properties.targetResourceUri -eq $1.id}) if([string]::IsNullOrEmpty($Scaling)){$AutoSc = $false}else{$AutoSc = $true} $Diag = if($data.virtualMachineProfile.diagnosticsProfile){'Enabled'}else{'Disabled'} @@ -60,6 +64,7 @@ If ($Task -eq 'Processing') 'ID' = $1.id; 'Subscription' = $sub1.Name; 'Resource Group' = $1.RESOURCEGROUP; + 'AKS / SFC' = $Related; 'Name' = $1.NAME; 'Location' = $1.LOCATION; 'SKU Tier' = $1.sku.tier; @@ -106,21 +111,22 @@ Else $TableName = ('VMSSTable_'+($SmaResources.VMSS.id | Select-Object -Unique).count) $Style = @() - $Style += New-ExcelStyle -HorizontalAlignment Center -AutoSize -NumberFormat '0' -Range A:V - $Style += New-ExcelStyle -HorizontalAlignment Center -AutoSize -NumberFormat '0.0' -Range X:Z + $Style += New-ExcelStyle -HorizontalAlignment Center -AutoSize -NumberFormat '0' -Range A:W + $Style += New-ExcelStyle -HorizontalAlignment Center -AutoSize -NumberFormat '0.0' -Range Y:AA $Style += New-ExcelStyle -HorizontalAlignment Left -Range W:W -Width 60 -WrapText $condtxt = @() - $condtxt += New-ConditionalText FALSE -Range K:K - $condtxt += New-ConditionalText FALSO -Range K:K - $condtxt += New-ConditionalText Disabled -Range H:H - $condtxt += New-ConditionalText FALSE -Range U:U - $condtxt += New-ConditionalText FALSO -Range U:U + $condtxt += New-ConditionalText FALSE -Range L:L + $condtxt += New-ConditionalText FALSO -Range L:L + $condtxt += New-ConditionalText Disabled -Range I:I + $condtxt += New-ConditionalText FALSE -Range V:V + $condtxt += New-ConditionalText FALSO -Range V:V $Exc = New-Object System.Collections.Generic.List[System.Object] $Exc.Add('Subscription') $Exc.Add('Resource Group') + $Exc.Add('AKS / SFC') $Exc.Add('Name') $Exc.Add('Location') $Exc.Add('SKU Tier')