Does anyone know how to do switches in script cmdlets? What I want is to have a parameter called monolithic that is a boolean, and if you call the cmdlet with -monolithic, the value is set to true, otherwise to false.
The closest I've gotten to this is using: [bool]$Monolithic=0 in the parameter set.
The problem with that is that if I call the cmdlet with -monolithic, PowerShell complains that I need to supply a boolean argument. If I leave off the [bool] part at the front, PowerShell complains that I need to supply a System.Object.
Anyone know how to do this?
Thanks, |