Yesterday I bumped into an intermittent issue on our Jenkins CI server where some Business Central containers where not getting removed after use. This led me to find a way of removing Business Central Docker containers with PowerShell, and a topic for a blog post. The issue seems to be with a process keeping the NavContainerHelper container folder open, which is stopping the script from removing it.. anyway, that’s not what this post is about.
Although you can use the Business Central Setup to install the Business Central Web Server components and create a single web server instance in IIS for client connection, there may be scenarios when you want to set up multiple instances.
For example, you could set up a separate Business Central Web Server instance for the different companies of a business, for this scenario, you can use the Business Central Web Server PowerShell cmdlets.
This article is only for on-premise installations of Business Central (BC). The cloud/SaaS version requires a completely different method of refreshing involving Sandboxes. The steps below might also work for older versions of NAV, but I have not done any regression testing.
An interesting question pops out yesterday: with Dynamics 365 Business Central on-premise, how can I programmatically check if a particular extension is installed or not?
The standard Powershell command (in the Microsoft.Dynamics.Nav.Apps.Management module) that gets informations about an extension in a specified Business Central Server instance is the Get-NAVAppInfo cmdlet (more info about it here).
Recently, I got the question on how to get a dependency tree from a bunch of Microsoft Dynamics 365 Business Central apps. In other words – how do I know in which order I have to import my apps to respect the dependencies.
Well, I didn’t have a ready-made script available. I only had a script my colleague provided me – so I took that as a starting point, and spent an evening in trying to put something together – as it IS a very interesting question ;-).
Typically, people use Outlook or other tool for emails. But if you want to be able to send an email without having to go into Outlook because it can cause you to get distracted, taking you away from what you’re working on, there is another method. This blog explains how to use a PowerShell script to send an email.
Like most of my posts this has its origin in Microsoft Dynamics 365 Business Central development – specifically our build process – although it isn’t limited to that.
We had a need to call a SOAP web service from PowerShell (see below for the background if you’re interested). In the past I’ve used Invoke-WebRequest and added content-type and a SOAPAction header to the request