Skip to content

PowerShell.Create() returns null #63

Closed
@patware

Description

@patware

.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions