mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
15 lines
509 B
PowerShell
15 lines
509 B
PowerShell
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
|
|
|
|
Remove-Item temp.xlsx -ErrorAction Ignore
|
|
|
|
$data = Invoke-Sum -data (Get-Process) -dimension Company -measure Handles, PM, VirtualMemorySize
|
|
|
|
$c = New-ExcelChartDefinition -Title "ProcessStats" `
|
|
-ChartType LineMarkersStacked `
|
|
-XRange "Processes[Name]" `
|
|
-YRange "Processes[PM]","Processes[VirtualMemorySize]" `
|
|
-SeriesHeader "PM","VM"
|
|
|
|
$data |
|
|
Export-Excel -Path temp.xlsx -AutoSize -TableName Processes -ExcelChartDefinition $c -Show
|