script to get report on for CPU usage, Memory usage and Free disk space

good morning,
I found this script on one of posting here and it was very helpful. I would like with the helps to modifying adding few output. I not getting it correctly.

I would like to add:
1) which executable program is using high CPU usage ( and duration time )
2)  how long user login duration ?
3)  can I change the freespace title to "freespace of C drive"
4) attach and email the report
5) bonus but not require last reboot time
6) bonus but not require, html format and email


GC C:\Temp\list.txt | % {
$Comp = $_
If (Test-Connection $Comp -Quiet){
$Luser = (Get-WmiObject -class win32_process -Filter "Name='Explorer.exe'" -ComputerName $Comp | % {$_.GetOwner().User} | Sort-Object -Unique) -join ","
$Mem = GWMI -Class win32_operatingsystem -computername $COMP
      New-Object PSObject -Property @{
      Server = $Comp
      "CPU usage" = "$((GWMI -ComputerName $COMP win32_processor | Measure-Object -property LoadPercentage -Average).Average) %"
      "Memory usage" = "$("{0:N2}" -f ((($Mem.TotalVisibleMemorySize - $Mem.FreePhysicalMemory)*100)/ $Mem.TotalVisibleMemorySize)) %"
        "Total FreeSpace" = "$("{0:N2}" -f ((Get-WmiObject -Class win32_Volume -ComputerName $COMP -Filter "DriveLetter='C:'" | Measure-Object -property FreeSpace -Sum).Sum /1GB)) GB"
       "logged Users" = $Luser
  "" | Select @{N="Server";E={$Comp}},"CPU usage","Memory usage","Total FreeSpace","logged Users"
 }| Select Server,"CPU usage","Memory usage","Total FreeSpace","logged Users" |
 Export-Csv "C:\Temp\report$(Get-Date -F dd_MM_yyy_hhmm).csv" -nti
Jimmy WangAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.