Rename-NAVCompany
Rename-NAVCompany
Renames a company in a Microsoft Dynamics NAV database.
Syntax
Parameter Set: Default
Rename-NAVCompany -CompanyName <String> -DatabaseName <String> -NewCompanyName <String> [-DatabaseInstance <String> ] [-DatabaseServer <String> ] [-ErrorLogFileName <String> ] [ <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? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DatabaseInstance<String>
The name of the SQL Server instance for the database that contains the company that you want to rename.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DatabaseName<String>
The name of the database that contains the company that you want to rename.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DatabaseServer<String>
The name of the computer that is running SQL Server.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-ErrorLogFileName<String>
Specifies the name of the error log file that contains errors that occur during the rename operation.
You can specify a full path or a file name. If you specify a file name, then the error log file is created in the current directory.
If you omit the parameter, then errors are logged to a file named RenameNavCompanyErrorLog.txt, located in the current directory.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-NewCompanyName<String>
Specifies the new name of the company.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
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 company Cronus Ltd. in the Cronus database to MyCompany.
C:\PS>Rename-NAVCompany -DatabaseName Cronus -CompanyName "Cronus Ltd." -NewCompanyName MyCompany -Verbose
VERBOSE: NavCommand.BeginProcessing
VERBOSE: NavCommand.ProcessRecord
VERBOSE: Renaming company 'Cronus Ltd.' to 'MyCompany' ...
VERBOSE: Renaming of company 'Cronus Ltd.' to 'MyCompany' has completed successfully.
VERBOSE: NavCommand.EndProcessing
-------------------------- EXAMPLE 2 --------------------------
This example renames the company Cronus Ltd. in the Cronus database to MyCompany. Errors are logged to the file C:\NavDatabases\ErrorLog.txt.
C:\PS>Rename-NAVCompany -DatabaseName Cronus -CompanyName "Cronus Ltd." -NewCompanyName MyCompany -ErrorLogFileName C:\NavDatabases\ErrorLog.txt