Fix NAV2015 Administration Shell after NAV 2016 installation

You should read Arend-Jan’s blogpost first.

He explains that after you install NAV2016 on a machine that already had NAV2015 on it, that it breaks the NAV2015 Administration console. Arend-Jan also provide a fix for this! A really easy one even.

But he was also talking about “if you’re not a PowerShell guru” .. And such. Now, I’m not a guru, but I sure like to “fix” things purely in PowerShell. So – since I needed the fix myself – and since I’ll probably have to apply this fix a numerous times – I was wondering whether I could come up with a simple “run with PowerShell” fix for this issue.

And I believe I have a second solution, which is going to execute all the steps that Arend-Jan already described .. but all within PowerShell. Just copy/paste the script below in a PowerShell ISE, execute it, and you should be good to go. On top of that, you might be able to include this script in any provisioning-script that you might already have .. . Don’t know – it’s up to you and the script is “as is” ;-).

Thanks Arend-Jan for sorting this out ;-).

$BaseReg90 = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', [net.dns]::GetHostName())
$RegKey90  = $BaseReg90.OpenSubKey('SOFTWARE\Microsoft\MMC\SnapIns\FX:{BA484C42-ED9A-4bc1-925F-23E64E686FCE}')

$BaseReg80 = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', [net.dns]::GetHostName())
$RegKey80 = $basereg80.CreateSubKey('SOFTWARE\Microsoft\MMC\SnapIns\FX:{BA484C41-ED9A-4bc1-925F-23E64E686FCE}')

foreach($RegKeyValue90 in $RegKey90.GetValueNames()){  
    $value80 = $RegKey90.GetValue($RegKeyValue90)

    if ($value80 -match '\\90\\'){
        $value80 = $value80 -replace '\\90\\','\80\'
    }
    if ($value80 -match 'ManagementUI, Version=9.0.0.0'){
        $value80 = $value80 -replace 'ManagementUI, Version=9.0.0.0','ManagementUI, Version=8.0.0.0'
    }
    if ($value80 -match 'BA484C42-ED9A-4bc1-925F-23E64E686FCE'){
        $value80 = $value80 -replace 'BA484C42-ED9A-4bc1-925F-23E64E686FCE','BA484C41-ED9A-4bc1-925F-23E64E686FCE'
    }

    $regkey80.SetValue($RegKeyValue90, $value80)
}

foreach($RegKeySubKey90 in $RegKey90.GetSubKeyNames()){
    write-host $RegKeySubKey90

    $RegKey80.CreateSubKey($RegKeySubKey90)
}

$msc80file = "${env:ProgramFiles(x86)}\Microsoft Dynamics NAV\80\RoleTailored Client\Microsoft Dynamics NAV Server.msc"
(get-content $msc80file).Replace('ba484c42-ed9a-4bc1-925f-23e64e686fce','ba484c41-ed9a-4bc1-925f-23e64e686fce') | Set-Content $msc80file

 

5.00 avg. rating (98% score) - 5 votes

Permanent link to this article: https://www.waldo.be/2015/10/14/fix-nav2015-administration-shell-after-nav-2016-installation/

11 comments

5 pings

Skip to comment form

  1. Hi,
    Or you can repair NAV 2015 with lunch again setup or from Windows Programs
    And it will put correctly NAV 2015 admin OK ๐Ÿ™‚

      • waldo on October 15, 2015 at 8:37 am
        Author

      Fair point .. thanks ๐Ÿ˜‰

  2. I have looked into it yet but does it exist generic administration apps/programs that can handle several versions?

      • Verndroid on October 15, 2015 at 12:35 pm

      You can get this tool to manage your service tiers across multiple versions:
      http://forum.mibuso.com/discussion/49935/service-tier-administration-tool-v2-3-0

      This link is for an older version but it has built in upgrade functionality.

    • Bitta on October 29, 2015 at 6:38 am
    • Reply

    Thanks for the magical solution

  3. Hi it is now solved with NAV 2016 CU1 ๐Ÿ™‚

      • waldo on November 13, 2015 at 11:05 am
        Author

      It is indeed! ๐Ÿ™‚

    • Martinho Costa on March 22, 2016 at 3:29 pm
    • Reply

    Hi there,

    I’m doing and upgrade to 2015 and I need to use the command “Sync-NAVTenant”. Since I have NAV 2016 also installed the powershell is retreiving the following error: “The Microsoft Dynamics NAV Admin tool can only manage version 9.0. The ServerInstance ‘MicrosoftDynamicsNavServer$UPG’ is Version ‘8”
    Tried the solution on this post but without any success. Any clue?
    Thanks in advance.

      • waldo on April 1, 2016 at 11:21 am
        Author

      Looks like you load the wrong version of the Microsoft.Dynamics.NAV.Management PowerShell module. This has nothing to do with my blog.. .

      You probably have multiple versions of NAV installed on that machine. This is how you can load the right module:
      https://nav-magno.be/2015/09/load-nav-service-dll-for-a-specific-server-instance/

      • Martinho Costa on April 1, 2016 at 12:31 pm

      Thanks a lot for your reply Waldo. sorry for it to be out of scope but it is going to help indeed.

  4. This problem has reappeared if you happen to be running NAV2017 & NAV2018 side-by-side. Thanks for the post Waldo!

  1. […] want to call himself a PowerShel guru, but if he is not, who else is? He couldn’t resist and wrote a PowerShell script to fix the NAV 2015 Administration tool. I was only thinking about using PowerShell to administer […]

  2. […] Tool2. In This Article  Waldo explain how to resolve the same issue using a Powershell cmdlet.Fix NAV2015 Administration Shell after NAV 2016 installation3. Below article Provides Details About New Try Function Released with Microsoft Dynamics NAV […]

  3. […] Continued on Source: Fix NAV2015 Administration Shell after NAV 2016 installation ยป waldo's blog […]

  4. […] He explains that after you install NAV2016 on a machine that already had NAV2015 on it, that it breaks the NAV2015 Administration console. Arend-Jan also provide a fix for this! A really easy one even. More… […]

Leave a Reply to laurent BUISSON Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: