The following syntax can be parsed but I must be doing something wrong..
PS> function example()
[Quoted Text] >> { >> [CmdletBinding] >> >> [Parameter(Mandatory=$true)] >> [string] $server >> [Parameter(Mandatory=$false)] >> [string] $user >> [Parameter(Mandatory=$true)] >> [boolean] $enable >> [Parameter(Mandatory=$false)] >> [boolean] $verbose >> Process >> { >> '& cscript "test.wsf" //Job:"example" [ at ]psBoundParameters' >> } >> } >>
PS> example Unable to find type [CmdletBinding]: make sure that the assembly containing this type is loaded. At line:3 char:20 + [CmdletBinding] <<<< + CategoryInfo : InvalidOperation: (CmdletBinding:String) [], RuntimeException + FullyQualifiedErrorId : TypeNotFound
|