Skip to content

Commit

Permalink
2.3.14
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudio-Merola committed Dec 7, 2022
1 parent a66f72f commit a129693
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
15 changes: 7 additions & 8 deletions AzureResourceInventory.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
# #
##########################################################################################
<#
Expand Down Expand Up @@ -135,19 +135,18 @@ param ($TenantID,
Write-Host " To ignore this use <-SkipAdvisory> parameter. "
Write-Host "e.g. />./AzureResourceInventory.ps1 -TenantID <Azure Tenant ID> -SubscriptionID <Subscription ID> -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 <Azure Tenant ID> -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 <Azure Tenant ID> -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 <Azure Tenant ID> -Debug"
Write-Host ""
}
Expand Down
22 changes: 14 additions & 8 deletions Modules/Containers/VMSS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ########>

Expand All @@ -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'}
Expand All @@ -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;
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit a129693

Please sign in to comment.