diff --git a/ADRecon.ps1 b/ADRecon.ps1 index 3c7db8f..306c809 100644 --- a/ADRecon.ps1 +++ b/ADRecon.ps1 @@ -4312,7 +4312,8 @@ Function Get-ADRExcelPivotTable } $UsedRange = $SrcWorksheet.Range($PivotCols+$rows) $PivotCaches = $workbook.PivotCaches().Create([Microsoft.Office.Interop.Excel.XlPivotTableSourceType]::xlDatabase, $UsedRange, [Microsoft.Office.Interop.Excel.XlPivotTableVersionList]::xlPivotTableVersion12) - Remove-Variable Columns + Remove-Variable rows + Remove-Variable PivotCols Remove-Variable UsedRange } Remove-Variable PivotFailed