Hi all,
First attempt to use PowerShell. Trying to type "New-NAVServerInstance", can't find it. Do I need to add any add-ons or install anything?
Microsoft Dynamics NAV 2017
Trying to do something similar like Waldo did in one of his "How Do I videos".
Thanks,
*This post is locked for comments
Running these scripts didn't help me.
Import-Module "C:\Program Files\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1"
Import-Module "C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\NavModelTools.ps1"
We currently have both NAV2009 and NAV2017.
NAV2009 is on Prem but being replaced by NAV2017 in hosted remotely be a 3rd party company.
The server has the NAVAdminTool.ps1 but not the NAVModelTools.ps1 located at \\RemoteServer\c$\Program Files\Microsoft Dynamics NAV\100\Service\NAVAdminTool.ps1
Locally, NAV2017 is installed at C:\NAV201764BIT\RoleTailored Client\ .
There are no *.ps1 in this whole directory on the C Drive, how do I get the registry to look at the powershell scripts?
How can I import it from a remote server?
Can I copy the NavAdminTool.ps1 file and paste it on My C Drive and import the module there?
I did try this but received the following error message:
"
Welcome to the Server Admin Tool Shell!
For a complete list of Server cmdlets type
Get-Command -Module Microsoft.Dynamics.Nav.Management, Microsoft.Dynamics.Nav.Apps.Management
Get-ItemProperty : Cannot find path 'HKLM:\SOFTWARE\Microsoft\Microsoft Dynamics NAV\100\Service' because it does not exist.
At C:\Program Files (x86)\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1:17 char:32
+ ... $snapInAssembly = Join-Path (Get-ItemProperty -path $nstPath).Path " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKLM:\SOFTWARE\...NAV\100\Service:String) [Get-ItemProperty], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Program Files (x86)\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1:17 char:31
+ ... InAssembly = Join-Path (Get-ItemProperty -path $nstPath).Path "\$snap ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand
Test-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Program Files (x86)\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1:18 char:18
+ if(!(Test-Path $snapInAssembly)) { $snapInAssembly = Join-Path (Get ...
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCommand
Import-Module : Cannot bind argument to parameter 'Name' because it is null.
At C:\Program Files (x86)\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1:21 char:17
+ Import-Module $snapInAssembly -ErrorVariable errorVariable -ErrorAc ...
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Import-Module], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ImportModuleCommand
Get-ItemProperty : Cannot find path 'HKLM:\SOFTWARE\Microsoft\Microsoft Dynamics NAV\100\Service' because it does not exist.
At C:\Program Files (x86)\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1:17 char:32
+ ... $snapInAssembly = Join-Path (Get-ItemProperty -path $nstPath).Path " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKLM:\SOFTWARE\...NAV\100\Service:String) [Get-ItemProperty], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Program Files (x86)\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1:17 char:31
+ ... InAssembly = Join-Path (Get-ItemProperty -path $nstPath).Path "\$snap ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand
Test-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Program Files (x86)\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1:18 char:18
+ if(!(Test-Path $snapInAssembly)) { $snapInAssembly = Join-Path (Get ...
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCommand
Import-Module : Cannot bind argument to parameter 'Name' because it is null.
At C:\Program Files (x86)\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1:21 char:17
+ Import-Module $snapInAssembly -ErrorVariable errorVariable -ErrorAc ...
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Import-Module], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ImportModuleCommand
"
Thanks in advance
Great, glad to hear.
I upgraded my windows home to windows pro edition and web components have been installed successfully.
Thanks Zaid. I think the problem is that i am on Windows 10 HOME - I wont be able to install web server components. I would need Windows 10 PRO Edition for that. Let me do that and update you. :)
Thanks Roberto. I think the problem is that i am on Windows 10 HOME - I wont be able to install web server components. I would need Windows 10 PRO Edition for that. Let me do that and update you. :)
Well, It seems like you missed something.
Can you please verify the following:
- .Net framework 3.5/4.5
- IIS (rewrite component) installed successfully,
- HTTP Activation is selected.
If so try pc restart and then reinstall NAV components.
Let me know in either case. Thanks
Now I am in the process of installing Web Server components but I am getting an error. See image below
P.S I installed IIS features based on this article https://msdn.microsoft.com/en-us/library/hh167503(v=nav.90).aspx#Win8
I also made sure ports 7045, 7046, 7047, 7048 are not used in my instances.
What's wrong with it?
Thanks,
Great. It worked. Thanks Zaid!
Hi,
- First, Make sure you run powershell as administration.
- Run Following commands:
Import-Module "C:\Program Files\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1"
Import-Module "C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\NavModelTools.ps1"
These commands are for NAV 2017 but if you are on 2016 change them accordingly like change 100 to 90
Thanks
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156