Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

System.Management.Automation error OnPrem 2023 wave 1 version

(0) ShareShare
ReportReport
Posted on by 171

Hi there, 

We have been working with dotnet System.Management.Automation to launch PowerShell scripts in our OnPrem BC installation until this new version. 

With new version 2023 wave 1, the extension is published correctly, as the assembly is there, however this error appears when trying to launch scripts:

Cannot load an instance of the following .NET Framework object: assembly System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.

Appreciate your help on this. Do you think this can have an easy solution? Is there any other option or options to launch powershell scripts created inside BC?

Regards,

Carlos 

  • CU19071206-0 Profile Picture
    2 on at
    System.Management.Automation error OnPrem 2023 wave 1 version

    Hi Carlos,

    Have you found a solution for this issue? I have the same issue as you.

    Thank you for your answer.

  • Carlos Herrando Profile Picture
    171 on at
    RE: System.Management.Automation error OnPrem 2023 wave 1 version

    Thanks Zhu for your prompt response, I saw all of that, and seems to be the problem, but as it is OnPrem installation, I cannot use Azure Functions for this purpose.

    I will keep investigating on how to get this work in new .NET Standard

  • Suggested answer
    YUN ZHU Profile Picture
    81,365 Super User 2025 Season 1 on at
    RE: System.Management.Automation error OnPrem 2023 wave 1 version

    Hi, It seems to be related to the information below. Perhaps you should modify your solution, such as Azure Function.

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/deprecated-features-platform#changes-in-2023-release-wave-1-version-220

    pastedimage1683590448160v1.png

    Hopefully other experts can give you better advice.

    Thanks.

    ZHU

  • Carlos Herrando Profile Picture
    171 on at
    RE: System.Management.Automation error OnPrem 2023 wave 1 version

    To add more information, I have found PowerShellRunner AddIn included in installation, but also not working, same error message.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,110 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans