Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for showcpuh.ps

(view source code of showcpuh.ps as plain text)

  1. write-host
  2. write-host "ShowCpuH.ps1,  Version 1.00"
  3. write-host "Show CPU details in HTML"
  4. write-host "Written by Rob van der Woude"
  5. write-host "http://www.robvanderwoude.com"
  6. write-host
  7.  
  8. get-wmiobject -class Win32_Processor | convertto-html DeviceID,Name,CurrentClockSpeed,LoadPercentage -head "<title>CPU details for $env:computername</title>`n<style type=`"text/css`">`nbody { padding: 8px; line-height: 1.33 }`ntable { border-style: ridge }`ntd, th { padding: 10px; border-style: dotted; border-width: 1px }`nth { font-weight: bolder; text-align: center }`n</style>" | out-file -FilePath "showcpuh.html" -Encoding "ASCII"
  9. invoke-item "showcpuh.html"
  10.  

page last modified: 2024-04-16; loaded in 0.0070 seconds