UPDATE: If you're interested in a convenient way to run the BcContainerHelper PowerShell commands, check out Krzysztof's Azure Data Studio Notebook with sample BcContainerHelper commands. Jupyter Notebooks are a great way to include documentation and commands in a single convenient format.
If you are using Business Central Docker containers, make sure to regularly update NAV Container Helper.
===============================
UPDATE: After thinking about this more, it just didn't make sense that the NavContainerHelper module I had downloaded just 9 days ago would have an old reference to $NAV instead of BC. The $NAV parameter would presumably have been phased out months ago.
So how was it possible that calling my 9 day old version of NavContainerHelper resulted in an error due to an old $NAV reference?
The explanation lies in my complete ignorance of PowerShell and how PowerShell modules work.
AJ Kauffmann explained to me that I can check which versions of the NavContainerHelper module I have installed. This is probably obvious to PS folks, but I didn't know that PS maintained multiple module versions.
AJ informed me of the "-allversions" parameter that will show all of the versions I have installed. I've collected quite a few.
I'm a Collector |
I then started wondering: Is it possible that PowerShell called one of these old versions, which did contain the NAV reference?
The answer is: YES. It is possible, and likely explains the error I encountered.