mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-08 02:02:56 +01:00
update
This commit is contained in:
3
WELA.ps1
3
WELA.ps1
@@ -72,7 +72,8 @@ function CalculateUsableRate {
|
|||||||
$totalCounts | ForEach-Object {
|
$totalCounts | ForEach-Object {
|
||||||
$level = $_.Level
|
$level = $_.Level
|
||||||
$total = $_.Count
|
$total = $_.Count
|
||||||
$usableCount = ($counts | Where-Object Level -eq $level | Select-Object -ExpandProperty Count -First 1) -or 0
|
$usableCount = ($counts | Where-Object Level -eq $level | Select-Object -ExpandProperty Count -First 1)
|
||||||
|
if ($null -eq $usableCount) { $usableCount = 0 }
|
||||||
$percentage = if ($total -ne 0) { "{0:N2}" -f ($usableCount / $total * 100) } else { "0.00" }
|
$percentage = if ($total -ne 0) { "{0:N2}" -f ($usableCount / $total * 100) } else { "0.00" }
|
||||||
$result += [PSCustomObject]@{
|
$result += [PSCustomObject]@{
|
||||||
Level = $level
|
Level = $level
|
||||||
|
|||||||
Reference in New Issue
Block a user