I have a function accepting an enum value as parameter. As an example, consider something like:
(PS) > function IsItFriday([System.DayOfWeek] $dayOfWeek) {
To avoid the error put the enum value in parenthesis:
PS > IsItFriday ([System.DayOfWeek]::Monday) no PS > IsItFriday ([System.DayOfWeek]::Friday) yes