I'm trying to get a last boot time report and my script keeps out repeating the same output 8 times, I'm sure its a syntax error. Here is what I have:
$ServerName = (Get-Content -Path
D:\Users\Admin.sa\Desktop\Computerlist.txt)
##### Script Starts Here ######
foreach ($Server in $ServerName) {Get-CimInstance -Cn $Servername -ClassName
win32_operatingsystem | select csname,lastbootuptime}
Format-Table -AutoSize