블로그 이미지
LifeisSimple

calendar

1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

Notice

'Brain Trainning/PowerShell'에 해당되는 글 1

  1. 2011.01.29 [PS] Powershell Tip of the day - 20110129
2011. 1. 29. 15:28 Brain Trainning/PowerShell
출처 : http://app.en25.com/e/es.aspx?s=1403&e=18387&elq=098307d1954b4987a974a247140f9022

PowerTip of the Day, from PowerShell.com:


Create HTML report in style

Also, here is a template that shows you how to change to a nicer font if you want to export PowerShell results as HTML report. It will generate a process list and display it in a simple window:

$head = @'

     &ltstyle>

          body { font-family:Consolas }

          </style>

     &lttitle&gtProcess List</title>

'@

$path = "$env:temp\report.hta"

Get-Process | Select-Object Name, Company, ID, HandleCount, CPU |

ConvertTo-Html -Head &head -PreContent '&ltH1&gtProcess List</H1>' | Out-File $path


Invoke-Item $path

posted by LifeisSimple
prev 1 next