Hands On with Microsoft Dynamics GP 2018 R2: Create Company Using PowerShell

Microsoft Dynamics GPMicrosoft Dynamics GP 2018 R2 was released on the 2nd October. In this series of posts, I’ll be going hands on and installing the majority of the components; some of them, such as Analysis Cubes for Excel, which are little used, I won’t be covering.

The series index will automatically update as posts go-live in this series.

GP PowerShell can be used to create companies and other actions. The following example shows how GP PowerShell can be used to create a new company:

Administrator: Microsoft Dynamics GP 2018 PowerShell

Add-CompanyDatabase -GPClientDirectory "C:\Program Files (x86)\Microsoft Dynamics\GP2018" -SqlAdmin "sa" -SqlAdminPassword "password" -SqlServerName "SERVER\GP" -CompanyName "azurecurve Publishing" -CompanyDbName "A18R2"-SqlMdfFilePath "C:\SQL Server\Data\" -SqlMdfFileName "GPSA18R2Dat.mdf" -SqlLdfFilePath "C:\SQL Server\Data\" -SqlLdfFileName "GPSA18R2Dat.ldf"

The supplied parameters and their values are:

  • -GPClientDirectory “C:\Program Files (x86)\Microsoft Dynamics\GP2018”
  • -SqlAdmin “sa”
  • -SqlAdminPassword “password”
  • -SqlServerName “SERVER\GP”
  • -CompanyName “azurecurve Publishing”
  • -CompanyDbName “A18R2”
  • -SqlMdfFilePath “C:\SQLServer\Data\”
  • -SqlMdfFileName “GPSA18R2Dat.mdf”
  • -SqlLdfFilePath “C:\SQLServer\Data\”
  • -SqlLdfFileName “GPSA18R2Dat.ldf”

the text between the quotation marks needs to be changed to the values you want to use to create the company.

Enter the cmdlet and parameters into GP PowerShell and hit return and the cmdlet will launch GP Utilities and create the new company; if you have any missing parameters or errors the launch will fail (usually with a less than helpful message).

Click to show/hide the Hands On with Microsoft Dynamics GP 2018 R2 Series Index

Can ISC Software Solutions help?

ISC Software Solutions are UK and Ireland based experts on Microsoft Dynamics GP. If you'd like to speak to someone about support, consultancy, upgrades, implementation, development, GP Elementz add-ons or portals, or anything else Dynamics GP related, you can use the form below.
Your Name (required):
Your Email (required):
Enquiry message:

What should we write about next?

Your Name (required) -
Your Email (required) -

Leave a Reply

Your email address will not be published. Required fields are marked *