I know, I know what you’re gonna say: license files are a thing of the past 😅 But even though I prefer the SaaS-model a lot over the on-prem model, we can’t forget that there are still tons of customers on-prem. And just recently I had a tedious task I didn’t want to manually do (over and over again)…
Background to this task is: we have a customer, that has a solution (not developed by us) which grew over a couple of years. This solution was initially only planned for one country. A couple of years ago another country got Business Central and also got this solution. Now, they are currently in the testing-phase for 5 additional countries – and also some additional (custom) extensions. So, we have only for this customer already 7 different licenses and (up to) 6 different apps. The thing is: sometimes it’s forgotten to update every object in all licenses. And I didn’t want to manually compare roughly 800 objects if they are licensed correctly in each country-version.
So I added some additional functionality to my D365BCAppHelper-module. There are 4 new CmdLets:
- Takes a license summary file (TXT) as an Input and returns an array of a PSCustomObject which is easy to process in PowerShell (see more info here on GitHub)
- Basically taks a directory as an Input and returns an array of a PSCustomObject which is easy to process as well (see more info here on GitHub)
- Basically cross-references the return values from the previous two CmdLets and returns for each object if it’s licensed or not (see more info here on GitHub)
- Similar to the previous one, but basically filtered to unlicensed objects (see more info here on GitHub)
I already created an additional script which will always download the latest licence file from a central storage and compare it to every repo on DevOps for that customer (basically clone every repo and cross-reference the info from the latest license-file for the relevant countries). Saves me now a lot of time and I think it might be useful for others as well 😊 If there is some spare time I’ll try to come up with a re-usable script for a task in a build-pipeline, which could run every build and update an info-table somewhere on DevOps to always have the latest results on hand.
Also thanks to @ChrisBlankDe – he found an issue in the module and logged it on GitHub so that it could be fixed. If you encounter any problems with this module, please reach out 👍
Oh, and of course for the ones who just want to copy-paste the commands 😉
Install-Module -Name D365BCAppHelper # Or Update-Module -Name D365BCAppHelper -Force