Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import specified version of NAV modules #39

Open
kaspermoerch opened this issue Jun 30, 2017 · 4 comments
Open

Import specified version of NAV modules #39

kaspermoerch opened this issue Jun 30, 2017 · 4 comments
Assignees

Comments

@kaspermoerch
Copy link

kaspermoerch commented Jun 30, 2017

It would be great if you where able to import a specified version of the NAV modules with Import-NAVModules e.g.

Import-NAVModules -navVersion 10

would import whatever version of NAV 2017 you have installed.

At the moment it seems the parameter is not used for anything.

@waldo1001
Copy link
Owner

Thanks! Will look into it when time permits!

@waldo1001 waldo1001 self-assigned this Jun 30, 2017
@Koubek
Copy link
Contributor

Koubek commented Jul 1, 2017

Hi again, I move the discussion from Twitter here. I paste my question and your response here:

@Koubek What does mean "version 10" exactly? In the case of multiple CUs deployed...

@kaspermoerch If you have multiple installs with the same major version, it should list those. It should be like a filter so could also include build no.

Actually, the idea behind was to give the possibility to load a specific version+CU and offer so the script to be used in a fully automated process. Right now (and in whatever situation similar you describe) is required user interaction.

So, my opinion is we need to consider:
Support (or not) the scenarios when the script should behave in a fully automated manner.
In case the previous response is YES, we need to decide what value can be passed in but users (build no. vs. major version no.). I can see the decision here is pretty important.
If you specify build no. it should be pretty easy. But in case you can specify major version no. I would also recommend using of -Force parameter and there should be some algorithm that will choose which version (latest???) will be imported.

At that moment I didn`t implement the algorithm correctly exactly for the doubts I had and I have presented here right now. And later I actually forgot, sorry for that.

Maybe my thoughts are wrong so in this case sorry in advance ;)

@jhoek
Copy link
Contributor

jhoek commented Mar 14, 2018

To honour the Unix philosophy of "one thing well", which PowerShell appears to have adopted in its built-in cmdlets, I would suggest creating a separate, (probably parameterless) cmdlet that returns the installed NAV versions. This cmdlet (~Get-InstalledNAVVersion) would be available for stand-alone use (although I cannot come up with a practical use-case right now...), but would also be used from the PowerShell argument completer/dynamic parameters of e.g. the Import-NAVModules cmdlet.

I guess my point is - create separate cmdlets as much as meaningfully possible. :-)

@Koubek
Copy link
Contributor

Koubek commented Mar 14, 2018

@jhoek Maybe this is not exactly what you have on your mind but you could use Start-NAVVersionModuleSearch as a starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants