You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.Net Standard 2.0
PowerShellStandard.Library Version 5.1.0
public class Class1
{
public string Foo()
{
using(var ps = PowerShell.Create())
{
ps.AddScript("'Hi'");
var result = ps.Invoke();
return result.ToString();
}
}
}
The PowerShell.Create() returns null.
Tried also with PowerShell.Create(RunspaceMode.NewRunspace), same result.