
Hello everyone!
I'm trying to execute a basic powershell script in BC:
dotnet
{
assembly("System.Management.Automation")
{
type("System.Management.Automation.PowerShell"; "PowerShell") { }
}
}
pageextension 50164 DotNetItem extends "Item List"
{
trigger OnOpenPage()
var
Shelly: DotNet PowerShell;
begin
Shelly := Shelly.Create();
Shelly.AddScript('C:\Users\MartinRuhland\Documents\Zeug\Testscript.ps1');
Shelly.Invoke();
end;
}
The code compiles, but throws a runtime error: "Ambiguous Match found"
The script itself works fine. Am i missing something? Is it even possible?
Regards
Martin