From cfd3db5803bd23efacac177e84212387a8ab5fe7 Mon Sep 17 00:00:00 2001 From: jhoneill Date: Mon, 6 May 2019 09:43:38 +0100 Subject: [PATCH] Example : Analyze_this --- Examples/ScriptAnalyzer/Analyze_this.ps1 | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Examples/ScriptAnalyzer/Analyze_this.ps1 b/Examples/ScriptAnalyzer/Analyze_this.ps1 index c88d67f..634ff71 100644 --- a/Examples/ScriptAnalyzer/Analyze_this.ps1 +++ b/Examples/ScriptAnalyzer/Analyze_this.ps1 @@ -1,13 +1,25 @@ <# .Synopsis + Runs PsScriptAnalyzer against one or more folders and pivots the results to form a report. + .Example + Analyze_this.ps1 + Invokes script analyzer on the current directory; creates a file in $env:temp and opens it in Excel + .Example + Analyze_this.ps1 -xlfile ..\mymodule.xlsx -quiet + Invokes script analyzer on the current directory; creates a file in the parent directory but does not open it + .Example + "." , (dir 'C:\Program Files\WindowsPowerShell\Modules\ImportExcel\') | .\examples\ScriptAnalyzer\Analyze_this.ps1 + run from a developemnt directory for importExcel it will produce a report for that directory compared against installed versions + this creates the file in the default location and opens it #> [CmdletBinding()] param ( [parameter(ValueFromPipeline = $true)] - $Path = $PWD, - $xlfile = "$env:TEMP\ScriptAnalyzer.xlsx", - $ChartType = 'BarClustered' , + $Path = $PWD, + $xlfile = "$env:TEMP\ScriptAnalyzer.xlsx", + $ChartType = 'BarClustered' , + $PivotColumns = 'Location', [switch]$Quiet )