Tip: Passing [switch]Parameters to Nested Functions

Here’s something that bedeviled me for the longest time: if I have a [switch] type parameter at the script level, how do I pass it to the core function it calls? # script Test-It.ps1 will call Test-It function param (      [String[]]$ComputerName = @(),      [switch]$Full     ); function Test-It {      param (          [String[]]$ComputerName = $script:ComputerName          [switch]$Full      );          …

1