Skip to content

Commit

Permalink
Merge pull request #152 from davymartu/ipaddresses-column-format
Browse files Browse the repository at this point in the history
fix column formats for ip addresses
  • Loading branch information
Claudio-Merola authored Nov 16, 2023
2 parents 9a402ad + 00d1309 commit 5acc883
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
8 changes: 7 additions & 1 deletion Modules/Compute/VM.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,17 @@ else
$Exc.Add('Tag Value')
}

$noNumberConversion = @()
$noNumberConversion += 'OS Version'
$noNumberConversion += 'Image Version'
$noNumberConversion += 'Private IP Address'
$noNumberConversion += 'DNS Servers'

$ExcelVar = $SmaResources.VM

$ExcelVar |
ForEach-Object { [PSCustomObject]$_ } | Select-Object -Unique $Exc |
Export-Excel -Path $File -WorksheetName 'Virtual Machines' -TableName $TableName -MaxAutoSizeRows 100 -TableStyle $tableStyle -ConditionalText $cond -Style $Style, $StyleExt
Export-Excel -Path $File -WorksheetName 'Virtual Machines' -TableName $TableName -MaxAutoSizeRows 100 -TableStyle $tableStyle -ConditionalText $cond -Style $Style, $StyleExt -NoNumberConversion $noNumberConversion

$excel = Open-ExcelPackage -Path $File -KillExcel

Expand Down
8 changes: 7 additions & 1 deletion Modules/Networking/NetworkSecurityGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,15 @@ If ($Task -eq 'Processing') {
$Exc.Add('Tag Value')
}

$noNumberConversion = @()
$noNumberConversion += 'Source Address Prefixes'
$noNumberConversion += 'Source Address Prefix'
$noNumberConversion += 'Destination Address Prefixes'
$noNumberConversion += 'Destination Address Prefix'

$ExcelVar |
ForEach-Object { [PSCustomObject]$_ } | Select-Object -Unique $Exc |
Export-Excel -Path $File -WorksheetName 'Network Security Groups' -AutoSize -MaxAutoSizeRows 100 -TableName $TableName -TableStyle $tableStyle -ConditionalText $condtxt -Style $Style
Export-Excel -Path $File -WorksheetName 'Network Security Groups' -AutoSize -MaxAutoSizeRows 100 -TableName $TableName -TableStyle $tableStyle -ConditionalText $condtxt -Style $Style -NoNumberConversion $noNumberConversion


<######## Insert Column comments and documentations here following this model. See StoraceAcc.ps1 for samples #########>
Expand Down
5 changes: 4 additions & 1 deletion Modules/Networking/PublicIP.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,14 @@ Else {
$Exc.Add('Tag Value')
}

$noNumberConversion = @()
$noNumberConversion += 'IP Address'

$ExcelVar = $SmaResources.PublicIP

$ExcelVar |
ForEach-Object { [PSCustomObject]$_ } | Select-Object -Unique $Exc |
Export-Excel -Path $File -WorksheetName 'Public IPs' -AutoSize -MaxAutoSizeRows 100 -TableName $TableName -TableStyle $tableStyle -Style $Style -ConditionalText $condtxt
Export-Excel -Path $File -WorksheetName 'Public IPs' -AutoSize -MaxAutoSizeRows 100 -TableName $TableName -TableStyle $tableStyle -Style $Style -ConditionalText $condtxt -NoNumberConversion $noNumberConversion

$excel = Open-ExcelPackage -Path $File -KillExcel

Expand Down
5 changes: 4 additions & 1 deletion Modules/Networking/VirtualNetwork.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,16 @@ Else {
$Exc.Add('Tag Name')
$Exc.Add('Tag Value')
}

$noNumberConversion = @()
$noNumberConversion += 'DNS Servers'

$ExcelVar = $SmaResources.VirtualNetwork


$ExcelVar |
ForEach-Object { [PSCustomObject]$_ } | Select-Object -Unique $Exc |
Export-Excel -Path $File -WorksheetName 'Virtual Networks' -AutoSize -TableName $TableName -TableStyle $tableStyle -ConditionalText $condtxt -Style $Style
Export-Excel -Path $File -WorksheetName 'Virtual Networks' -AutoSize -TableName $TableName -TableStyle $tableStyle -ConditionalText $condtxt -Style $Style -NoNumberConversion $noNumberConversion


$excel = Open-ExcelPackage -Path $File -KillExcel
Expand Down

0 comments on commit 5acc883

Please sign in to comment.