Managing companies
Individual companies inside the database can also be created, removed, or renamed with PowerShell cmdlets. Now we will run several simple examples illustrating basic operations with companies.
How to do it...
The cmdlets illustrated in this recipe, create a company in the database, create a copy of the company, and rename it.
- First, create a new blank company in the demo database:
New-NAVCompany ` -ServerInstance DynamicsNAV90 -CompanyName TestCompany
This cmdlet will create aÂ
TestCompany
company in the databaseDemo Database NAV (9-0)
database that is the source database for theDynamicsNAV90
service. - To verify that the company has been successfully created, run the NAV client and choose the menu action Select Company in the main application menu:
- The new company is available in the list:
- Cmdlet
New-NAVCompany
creates a blank company without any data. Another cmdlet,Copy-NAVCompany
, creates a copy of an existing company in the same database:Copy-NAVCompany ` -ServerInstance...