Fix to parameter set detection in Export-Excel

Parameter set problem was causing  append to demand a table name.
Tweaked eample in join worksheet, added another join worksheet sample
This commit is contained in:
jhoneill
2018-07-07 12:00:14 +01:00
parent 02878e1d4d
commit 75676a810f
4 changed files with 18 additions and 6 deletions

View File

@@ -0,0 +1,11 @@
$path = "$env:TEMP\Test.xlsx"
Remove-item -Path $path -ErrorAction SilentlyContinue
Get-WmiObject -Class win32_logicaldisk |
Select-Object -Property DeviceId,VolumeName, Size,Freespace |
Export-Excel -Path $path -WorkSheetname Volumes -NumberFormat "0,000"
Get-NetAdapter |
Select-Object -Property Name,InterfaceDescription,MacAddress,LinkSpeed |
Export-Excel -Path $path -WorkSheetname NetAdapters
Join-Worksheet -Path $path -HideSource -WorkSheetName Summary -NoHeader -LabelBlocks -AutoSize -Title "Summary" -TitleBold -TitleSize 22 -show