I have a PowerShell script . I want the script output to have two options depending on flag set within script execution command :
for example I have the following script test.ps1:
Write-Host 'statement 1'`n
Write-Host 'statement 2'`n
Write-Host 'statement 3'`n
I want when I run the script to have two options:
one option to print only statement 1.
the second option to print all statements (1, 2,and 3).
is that possible in PowerShell ?