Class Not Being Created In Powershell
So I'm trying to create a JavaScript function inside Powershell and I use a class called 'sc': $language = 'JScript' function Create-ScriptEngine() { param([string]$language =
Solution 1:
The scope of $sc is limited to the Create-ScriptEngine function, so trying to call it outside of the function will result in null.
Also, your $js appears to be null too, because your function isn't returning anything. I assume that you'll want to put return $sc within the Create-ScriptEngine function to get your code working.
Post a Comment for "Class Not Being Created In Powershell"