Script ends with error messages
Hey @waldo1001 , when I exectue your script: https://github.com/waldo1001/Cloud.Ready.Software.PowerShell/blob/master/PSScripts/NAV%20Docker/LocalDocker/_ExportObjectsAsAL.ps1
I get the following errors. Unfortunately the output is partially in German. If you need the whole text, I can translate it for you.
And here is you adjusted script:
Thank you :)
Few questions:
- are you running this on the insider-build? if so - won't work, because no C/AL anymore - the objects are already in AL
- did you install my powershell-cmdlets on the container? can be done by:
Install-NCHDependentModules `
-ContainerName $ContainerName `
-ContainerModulesOnly
Unfortunately it is not possible for me to install your powershell-cmdlets...

I opened Windows Powershell ISE and copied your code from above. Then I executed it and I got the error message:

Here the error message in English: The file was not recognized as the name of a cmdlet, function, script file, or executable program.
Can you explain me, how to solve this?
I think you didn't install the "CRS.NavContainerHelperExtension" module?
you can do that with:
install-module 'CRS.NavContainerHelperExtension' -force
Ok, your advice helped me to install the modules, but when I execute your script from here:
https://github.com/waldo1001/Cloud.Ready.Software.PowerShell/blob/master/PSScripts/NAV%20Docker/LocalDocker/_ExportObjectsAsAL.ps1
I get the following error output in the PowerShell:

Where is my mistake?
nav container 0.5.0.2 ... current version is 0.6.4.0 --- maybe that's the problem with at least the last message.
And how can I solve this?
Update it:
install-module navcontainerhelper -force
What I tend to do If it does not end up to be working: I remove all possible sources of the module from the harddrive (that would be in the program files folder and under Documents\WindowsPowerShell\Modules) and than run install-module again. I even start my scripts with uninstall-Module -Name NavContainerHelper -Force Install-Module -Name NavContainerHelper -Force Import-Module -Name NavContainerHelper -Force just to make sure I only have the latest version of the module and not some older versions somewhere.
I updated the navcontainerhelper, but again I get an error message:

And here the error message for the Join-Path: "The argument can not be bound to the parameter Path because it is an empty string."
For this script, you can comment the first line - it doesn't need settings.. . Your first error will disappear.
Second error is a mistery. I don't know how your setup is, but it just works in a default docker container (just tried). You'll have to find out why you are not able to export that file.
Try to debug?
You were right, first error message has disappeared ;)
are you running as admin?
The WindowsPowerShell I am running as Admin.
I thought the reason for the error message could be, that my container was unhealthy, that is why I created a new one with the following image: microsoft/bcsandbox:latest-ltsc2016
Then I ran all your commands from above, but again I get the same error message...