I have a function accepting an enum value as parameter. As an example, consider something like:
(PS) > function IsItFriday([System.DayOfWeek] $dayOfWeek) {
It's a little bit unexpected - you need to wrap it in parenthesis so that the value is evaluated:
> IsItFriday ([System.DayOfWeek]::Monday)
also it is possible to pass only strings like this:
> IsItFriday Monday
no
> IsItFriday Friday
yes
PowerShell will convert it to the enum type. Handy, isn't it :)