Fix & Run outdated NAV & BC containers

When creating NAV/Business Central Containers from New-Navcontainer command, If you have not used this switch -accept_outdated, your container will not work after 90 days and will end up with this below message.

You are trying to run a container which is more than 90 days old.
Microsoft recommends that you always run the latest version of our containers.
Set the environment variable ACCEPT_OUTDATED to ‘Y’ if you want to run this container anyway.

To fix this up you need to update the “SetupVariables.ps1″ file in the container.

Open PowerShell with Run as administrator and execute the below commands.

Step 1: In Powershell

Enter-NavContainer D365BC


Step 2: 
In Powershell

Copy SetupVariables.ps1 C:\Run\my\


Step 3:

From the windows explorer navigate to the location “C:\ProgramData\NavContainerHelper\Extensions\D365BC\my”

Open the SetupVariables.ps1 and add the below-highlighted line $Accept_outdated = “Y” and then save the file.

$Accept_outdated = "$env:Accept_outdated"
$Accept_outdated = "Y"


Step 4: 
In Powershell

Copy C:\Run\My\SetupVariables.ps1 C:\Run\


Step 5:
In Powershell

Restart-NavContainer D365BC

I think there should be some easy way to run old containers but just thought of sharing this little information. Hope this helps to run your old containers so that you can recover some information from the container if any.

3 thoughts on “Fix & Run outdated NAV & BC containers

  1. Hi Divesh,
    How you Doing. I need your support on one of my Nav2017 Issue.
    i have one MsSql Server DB which is running on Mssql Server 2014. when im trying to add this DB to Navsion. its not working.
    i want you to help me on this on screen share. i will pay you for this if required.

    Like

  2. Hi Divesh
    I found this post useful althought I needed to install a new Nav container for testing purposes. First it takes a little time to figure out the 90 day date limit.
    Say hello to all other team members from me.
    Waiting for other useful posts to your blog 🙂
    Regards
    Kimmo Virmajoki

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s