C
C#9mo ago
leave

how to load the dll for System.Management.Automation on runtime ?

using System;
using System.Management.Automation;

class PowerShhel
{
public static void Main(string[] args)
{
string command = "";

using (PowerShell powerShell = PowerShell.Create())
{
powerShell.AddScript(command);
var results = powerShell.Invoke();
}
}
}
using System;
using System.Management.Automation;

class PowerShhel
{
public static void Main(string[] args)
{
string command = "";

using (PowerShell powerShell = PowerShell.Create())
{
powerShell.AddScript(command);
var results = powerShell.Invoke();
}
}
}
3 Replies
reflectronic
reflectronic9mo ago
what is the issue exactly
Lex Li
Lex Li9mo ago
Like adding the right assembly/package to your project file?
leave
leaveOP9mo ago
nevermind I fixed the issue
Want results from more Discord servers?
Add your server