Awara IT shares how to install Dynamics 365 Business Central using Power Shell with just a few clicks
Hello Team!
I’ve tried to create most shortly instruction how to install D365 Business Central using Power Shell only because I hate to do many clicks. For using this script you need local or virtual machine running on Windows 10 or Windows Server 2016 and PowerShell ISE running as administrator. Let’s go.
WINDOWS 10
1. Preparing environment (Skip this step if you already run any containers on your machine):
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V, Containers -All Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) choco feature enable -n allowGlobalConfirmation choco install visualstudiocode choco install docker-for-windows Restart-Computer -Force
Answer Yes to all questions except Restarting. It will be done in the end. Here we enable needed windows features and install docker and visual studio code. Chocolatey is a easy to use package manager. After Executing – your PC will be restarted.
2. Container run.
Before script executing be sure that Docker for windows is running (also switch it to Windows mode if it still not). And paste NAV2018 development license file into some simple folder (C:Temp for example). If you doesn’t have dev license – remove – licensefile parameter from script.
set-executionpolicy remotesigned install-module navcontainerhelper -force import-module navcontainerhelper new-navcontainer -accept_eula ` -containername bctest ` -imageName microsoft/bcsandbox ` -licensefile "c:temp2018.flf" ` -includecside ` -doNotExportObjectsToText
After run – you need to input your windows credentials. If you run this script first time – you can have a cup of coffee. It’s not a quick process.
3. Start work and development
After script execution you’ll get next info:
All shortcuts for work you’ll find on your desktop.
Download *.vsix file, install it to vscode, input Dev server address and instance and you’re ready for developing some new cool features.
WINDOWS SERVER 2016
1. Preparing environment (Skip this step if you already run any containers on your machine):
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force Install-Package -Name docker -ProviderName DockerMsftProvider Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) choco feature enable -n allowGlobalConfirmation choco install visualstudiocode Install-WindowsFeature -Name Hyper-V,Containers -IncludeManagementTools -Restart
Answer Yes to all questions except Restarting. It will be done in the end. Here we enable needed windows features and install docker and visual studio code. Chocolatey is a easy to use package manager. After Executing – your PC will be restarted.
2. Container run.
Before script executing paste NAV2018 development license file into some simple folder (C:Temp for example). If you doesn’t have dev license – remove -licensefile parameter from script.
install-module navcontainerhelper -force new-navcontainer -accept_eula ` -containername bctest ` -imageName microsoft/bcsandbox ` -licensefile "c:temp2018.flf" ` -includecside ` -doNotExportObjectsToText
3. Start work and development
After script execution you’ll get next info:
All shortcuts for work you’ll find on your desktop.
Download *.vsix file, install it to vscode, input Dev server address and instance and you’re ready for developing some new cool features.