Hands On With Microsoft Dynamics GP 2016 R1: Use Microsoft Dynamics GP PowerShell To Create A Company

May 25th, 2016 by

Microsoft Dynamics GPMicrosoft Dynamics GP PowerShell has a number of cmdlets which can be used to administer Microsoft Dynamics GP. Before you can use them GP PowerShell needs to be installed.

The following command can be used to return all available cmdlets for Dynamics GP PowerShell:

Get-Command = module GP2016

The following example shows how GP PowerShell can be used to create a new company:

Administrator: Microsoft Dynamics GP 2016 PowerShell
Add-CompanyDatabase -GPClientDirectory "C:Program Files (x86)Microsoft DynamicsGP2016" -SqlAdmin "sa" -SqlAdminPassword "password" -SqlServerName "2016R1-SQLGP" -CompanyName "azurecurve Publishing" -CompanyDbName "A16R1"-SqlMdfFilePath "C:SQL ServerData" -SqlMdfFileName "GPSA16R1Dat.mdf" -SqlLdfFilePath "C:SQL ServerData" -SqlLdfFileName "GPSA16R1Dat.ldf"

The supplied parameters and their values are:

  • -GPClientDirectory “C:Program Files (x86)Microsoft DynamicsGP2016”
  • -SqlAdmin “sa”
  • -SqlAdminPassword “password”
  • -SqlServerName “2016R1-SQLGP”
  • -CompanyName “azurecurve Publishing”
  • -CompanyDbName “A16R1”
  • -SqlMdfFilePath “C:SQLServerData”
  • -SqlMdfFileName “GPSA16R1Dat.mdf”
  • -SqlLdfFilePath “C:SQLServerData”
  • -SqlLdfFileName “GPSA16R1Dat.ldf”/li>

You would replace the text between the quotation marks with 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 2016 R1 Series Index

Source: azurecurve

Leave a Reply