Skip to main content

Ended up using PowerShell 7

· 2 min read

Today, I needed to install some extensions for a Business Central 24 OnPrem demo database but kept receiving various errors. Eventually, I decided to use PowerShell 7 after finding the installation guide on Microsoft's documentation.

During the process of trying to install the extensions, I continued to encounter the following errors:

Errors


Import-Module Error 1

Import-Module : The member 'FormatsToProcess' in the module manifest is not valid: Cannot find path '{Microsoft.BusinessCentral.Apps.Management}' because it does not exist.. Verify that a valid value is specified for this field in the '{Microsoft.BusinessCentral.Apps.Management}' file.


Import-Module Error 2

Import-Module : Could not load file or assembly '{Microsoft.BusinessCentral.Apps.Management}' or one of its dependencies. An attempt was made to load a program with an incorrect format.


Import-Module Error 3

Import-Module : The specified module '{Microsoft.BusinessCentral.Apps.Tools}' was not loaded because no valid module file was found in any module directory.


After attempting to import different modules and searching on Google for some time, I remembered the presentation of Business Central 2024 release wave 1. In one of the presentations, there were mentions of moving or supporting PowerShell 7.

These thoughts led me to search for updating or installing PowerShell 7, and I ended up on the Microsoft Doc where Microsoft described the installation process of PowerShell 7 in different ways.

I opted for Installing the ZIP package, which in short terms is a downloadable client that doesn't need to be installed; it just needs to be downloaded, unpacked and run.

I downloaded the "installation" files, unpacked the PowerShell installation, and ran the pwsh.exe as an administrator. After this, I ran the Install App script, and this time, it was successful.