'Powershell loop values of multiple variable in array
Trying to output multiple variables here in one and then email. I keep getting one for obvious reason that its not storing all values. Can you please help?
foreach ($computer in $computer_list)
{
# Write-Host $computer
$file = Get-childItem "\\$computer\c$\Users\test.log" -Include *log
$size = $file.Length/1gb
for ($i=0;$i -lt $computer.ReadCount; $i++)
{
$body += "$computer"
$body += "$file"
$body += "$size"
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
