C
C#8mo 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
reflectronic8mo ago
what is the issue exactly
Lex Li
Lex Li8mo ago
Like adding the right assembly/package to your project file?
leave
leaveOP8mo ago
nevermind I fixed the issue
Want results from more Discord servers?
Add your server