web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Calling Powershell scripts from NAV

(0) ShareShare
ReportReport
Posted on by 2,245

Hello dear experts!

Reading on Waldo's blog regarding the powershell session he carried out at Directions I got curious and I wanted to move a little project I have independant of NAV to inside NAV.

To accomplish that I need to be able to call Powershell script files from within NAV, and preferibly also be able to get the result as it's generated (messages, process % and such).

I have been messing around the System.Management.Automation dotnet class, specifically the Powershell type but when I run the Invoke method I get an "The Invoke method is ambiguous..." error.

Have any of you guys done something similar and can suggest a way to accomplish that? :) I'm working on NAV2013R2 at the moment.  

*This post is locked for comments

I have the same question (0)
  • Miguel Llorca Gómez Profile Picture
    7,019 User Group Leader on at

    Ambiguous...? Let me ask to my wife :-ppp

  • Suggested answer
    Miguel Llorca Gómez Profile Picture
    7,019 User Group Leader on at

    Maybe that helps! blogs.technet.com/.../using-net-assemblies-from-within-windows-powershell.aspx

    Good luck Jose!

  • jcastro Profile Picture
    2,245 on at

    Hello Miguel (hola! :)),

    Thank you for the suggestion. Saldy I do not see how that can help me. I am looking for a way to access the Powershell tools (basic stuff, executing a script, getting the output (real time preferibly and not once it's finished) and that link teaches how to access other .net assemblies from within Powershell. I don't want to access .net FROM powershell, I need to access Powershell itself from NAV.

    Thank you very much for your input though!

  • Suggested answer
    Miguel Llorca Gómez Profile Picture
    7,019 User Group Leader on at

    www.mibuso.com/.../viewtopic.php

    Regards,

  • jcastro Profile Picture
    2,245 on at

    Nooooow we are talking! :D

    I will definetly give that a shot. Thank you! 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans