How to use D365 BC 2022 AdminTool from Windows PowerShel

The new edition of "Dynamics 365 Business Central 2022" does not include a graphical interface for the admin tool. The command-line admin tool is not very user-friendly. A better alternative is to use "Windows PowerShell ISE". It has some features that make it easier to write commands for the admin tool. Here is how to use it:

Write the following script in PowerShell and run it. It will open the admin tool in PowerShell. Then you can choose different commands from the admin tool in the command window to write any script.

Import-Module 'C:\Program Files\Microsoft Dynamics 365 Business Central\210\Service\NavAdminTool.ps1'

If error execute:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted


·         To get all server configuration:

Get-NAVServerConfiguration -ServerInstance BC210

·         To set server configuration:

Set-NAVServerConfiguration -KeyName DeveloperServicesEnabled -ServerInstance BC210 -KeyValue True

·         To Restart the service:

Restart-NAVServerInstance -ServerInstance BC210



 


Comments

Popular posts from this blog

Microsoft Dynamics NAV - Creating and Consuming a Codeunit Web Service

Different use of AL Find Functions for Filters in Dynamics 365 Business Central

The new CRONUS license: Demonstration License for Dynamics 365 Business Central