I have a basic function:
Function Write-AdvancedLog{
[CmdletBinding()]
Param(
$WriteToEtl,
$Message,
$CurrentFunction
)
}
Essentially I want to specify a parameter -WriteToEtl without specifying a value. If the parameter is added to the Function call (Write-AdvancedLog -WriteToEtl) it will do a certain thing, if the switch isn't specified, it won't.
How can I achieve this?
[switch]$WriteToEtl