Setting up new user on Dynamics NAV with multiple builds on same computer

When you load NAV commands into Powershell - even if you use the current build, it reverts back to the build that was used for your version install.

The method I have found to overcome this is to change the registry using a helpful suggestion from another blog (ROEL BERGS).

The NAV developer and admin PowerShell are using Windows  PowerShell and can be imported when you start with Windows PowerShell using the import-module.

But first, you need to change the registry keys. Rather than use regedit, use PowerShell so you never forget to change it back!

You do need to have admin rights to the computer and run PowerShell in admin mode.

The following example is for NAV 2017 (edit the path for other releases):

$nstDefaultPath = "C:\Program Files\Microsoft Dynamics NAV\100\Service\"

$nstPath = "C:\Program Files\Microsoft Dynamics NAV\100\10.0.14199\Service\"

set-itemproperty -path "HKLM:\SOFTWARE\Microsoft\Microsoft Dynamics NAV\100\Service" -name "Path" -value $nstPath

now you can safely run import-module NAV-admintool.ps1 from the service directory.

You can set up a new service tier (I generally use the service tier administrator instead - a free download from Mibuso).

Where I find it useful is adding myself as a user to NAV database using:

new-navserveruser and new-navserveruserpermissionset.

When I am through then the following command restores the original registry settings.

set-itemproperty -path "HKLM:\SOFTWARE\Microsoft\Microsoft Dynamics NAV\100\Service" -name "Path" -value $nstDefaultPath

要查看或添加评论,请登录

David Machanick的更多文章

社区洞察

其他会员也浏览了