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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,524 Super User 2024 Season 2
Martin Dráb 228,493 Most Valuable Professional
nmaenpaa 101,148