Options

Set powershell to use an older nav version installed

Hello,

I need to use Export-NAVdata on a NAV 2015 database, and even though I've imported the modules from that build, powershell tells me i need to convert the database since I have 2016 also installed on the same machine. Any workaround for this?
Thanks in advance!

Answers

  • Options
    Peter+is1Peter+is1 Member Posts: 174
    Hi,

    Try the Remove-Module before Import-Module. Like:
    IF ( Get-Module -Name Microsoft.Dynamics.Nav.Apps.Tools )
        { Remove-Module -name Microsoft.Dynamics.Nav.Apps.Tools -force }
    

    It sometimes looks to me that powershell can keep things (modules) in memory after I force a stop on a script and then I have to restart powershell.

    Good luck.
    \\
    The truth exists in seven versions.
  • Options
    martinhocosta88martinhocosta88 Member Posts: 27
    just used this script and it solved my problem
Sign In or Register to comment.