Rename-NAVCompany
Rename-NAVCompany
Renames a company in a Microsoft Dynamics NAV database.
Syntax
Parameter Set: __AllParameterSets
Rename-NAVCompany [-ServerInstance] <String> [-CompanyName] <String> [-NewCompanyName] <String> [-Force] [-Tenant <TenantId> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
Use the Rename-NAVCompany cmdlet to rename a company in a Microsoft Dynamics NAV database.
Parameters
-CompanyName<String>
Specifies the name of the company that you want to rename. This must be an existing company in the specified Microsoft Dynamics NAV database.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-NewCompanyName<String>
Specifies the new name of the company.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-ServerInstance<String>
Specifies the Microsoft Dynamics NAV Server instance that the company uses, such as DynamicsNAV90. You can specify either the fully qualified name, such as 'MyServer$DynamicsNAV90', or the short name, such as 'DynamicsNAV90'.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
false |
-Tenant<TenantId>
Specifies the ID of the tenant that the company is stored in, such as Tenant1. This parameter is required unless the specified service instance is not configured to run multiple tenants.
Aliases |
Id |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- None
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
-------------------------- EXAMPLE 1 --------------------------
This example renames the CRONUS International Ltd. in the CRONUS database to MyCompany.
PS C:\> Rename-NAVCompany –ServerInstance 'DynamicsNAV90' -CompanyName 'CRONUS International Ltd.' -NewCompanyName 'MyCompany' -Verbose
VERBOSE: NavCommand.BeginProcessing
VERBOSE: NavCommand.ProcessRecord
VERBOSE: Renaming company 'CRONUS International Ltd.' to 'MyCompany' ...
VERBOSE: Renaming of company 'CRONUS International Ltd.' to 'MyCompany' has completed successfully.
VERBOSE: NavCommand.EndProcessing
-------------------------- EXAMPLE 2 --------------------------
This example renames the company CRONUS International Ltd. in the CRONUS database to MyCompany. Errors are logged to the file C:\NavDatabases\ErrorLog.txt.
PS C:\> Rename-NAVCompany –ServerInstance 'DynamicsNAV90' -CompanyName 'CRONUS International Ltd.' -NewCompanyName 'MyCompany' -ErrorLogFileName C:\NavDatabases\ErrorLog.txt