Added try/catch. Expanded aliases

This commit is contained in:
dfinke
2018-07-05 16:14:56 -04:00
parent e4fbf7e92e
commit eac352c28a
47 changed files with 204 additions and 136 deletions

View File

@@ -1,9 +1,10 @@

$p = ps | select Company, Handles | Export-Excel c:\temp\testBackgroundColor.xlsx -ClearSheet -KillExcel -PassThru
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
$p = Get-Process | Select-Object Company, Handles | Export-Excel c:\temp\testBackgroundColor.xlsx -ClearSheet -KillExcel -PassThru
$ws = $p.Workbook.WorkSheets[1]
$totalRows = $ws.Dimension.Rows
Set-Format -Address $ws.Cells["B2:B$($totalRows)"] -BackgroundColor LightBlue
Export-Excel -ExcelPackage $p -show
Export-Excel -ExcelPackage $p -show -AutoSize