Return value from Invoke-Command

I have tried everything I know, and everything the internet has told me to do, including a post on this page. I cannot seem to get a return value from Invoke-Command.

#$ADComputers = Get-ADComputer -Filter 'Name -notlike "HCI*"' 
$ADComputers = Get-ADComputer -Filter 'Name -like "test*"'

ForEach ($Computer in $ADComputers) {
$ComputerName = $Computer.Name
Write-Host "Pinging $ComputerName"

If (Test-Connection -ComputerName $ComputerName -Count 2 -Quiet) {
Write-Host "$ComputerName is online" -ForegroundColor Green
$CountDisks = {
#[int]$DiskCount = (Get-BitLockerVolume | Where-Object {$_.EncryptionPercentage -gt 0}).Count
#Write-Output $DiskCount
#$DiskCount = 1
Write-Output 1
$GetKeys = {
ForEach ($MountPoint in (Get-BitLockerVolume | Where-Object {$_.EncryptionPercentage -gt 0})) {
(Get-BitLockerVolume -MountPoint $MountPoint).KeyProtector | Where-Object {$_.KeyProtectorType -eq 'RecoveryPassword'} | Select-Object @{Name='ComputerName'; Expression = {$env:COMPUTERNAME}}, KeyProtectorID, RecoveryPassword 

$DiskCount = Invoke-Command -ComputerName $ComputerName -ScriptBlock $CountDisks #{(Get-BitLockerVolume | Where-Object {$_.EncryptionPercentage -gt 0}).Count}
If ($DiskCount -gt 0) {
$RecoveryKeys = Invoke-Command -ComputerName $ComputerName -ScriptBlock $GetKeys
Else {
Write-Host "$ComputerName has no encrypted disks."
Else {
Write-Host "$ComputerName is offline" -ForegroundColor Yellow

I WAS trying to get a count of encrypted disks, but it devolved into just trying to get Invoke-Command to return ANYTHING.

There are two Invoke-Commands, which one doesn’t return value ?
It seems its the second one for me, the second one will return a value only if the expression inside foreach return value.