试图写这部法典,只要我能够告诉所有东西,似乎是正确的,但当它显示“t isn ttabbing,并且只为一些书写的影子创造一个空间时:
Write-Host "`r`n`r`n Categories | $($oldValues.cluster)`t$($newValues.cluster)`t | % Used if Migrated" -ForegroundColor Yellow
Write-Host "---------------------------------------------------------------------------" -ForegroundColor Yellow
Write-host " Total MEM (GB) | $($oldValues.TotalMEM)`t$($newValues.TotalMEM)`t | %"
Write-host " Used MEM (GB) | $($oldValues.UsedMEM)`t$($newValues.UsedMEM)`t | " -ForegroundColor $(if(($($oldValues.UsedMEM) + $($newValues.UsedMEM))/$($newValues.TotalMEM) -lt 95) { Green } else { Red })
Write-host " Total CPU (GH) | $($oldValues.TotalCPU)`t$($newValues.TotalCPU)`t | "
Write-host " Used CPU (GH) | $($oldValues.UsedCPU)`t$($newValues.UsedCPU)`t | " -ForegroundColor $(if(($($oldValues.UsedCPU) + $($newValues.UsedCPU))/$($newValues.TotalCPU) -lt 95) { Green } else { Red })
Write-host "Total Storage (GB) | $($oldValues.TotalStorage)`t$($newValues.TotalStorage)`t | "
Write-host " Used Storage (GB) | $($oldValues.UsedStorage)`t$($newValues.UsedStorage)`t | " -ForegroundColor $(if(($($oldValues.UsedStorage) + $($newValues.UsedStorage))/$($newValues.TotalStorage) -lt 95) { Green } else { Red })
这是我获得的产出:
Categories | OLD Clus NEW Clus | % Used if Migrated
---------------------------------------------------------------------------
Total MEM (GB) | 1533 3067 | %
Used MEM (GB) | 24 113 |
Total CPU (GH) | 110 294 |
Used CPU (GH) | 2 6 |
Total Storage (GB) | 30719 10000 |
Used Storage (GB) | 570 317 |
我无法利用成员/邮联来打字。