Import-NAVServerLicense
Imports a license file into a Business Central database.
Import-NAVServerLicense
[-Tenant <TenantId>]
[-LicenseFile] <String>
[-Database <LicenseDatabase>]
[-ServerInstance] <String>
[-Force]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Import-NAVServerLicense
[-LicenseData] <Byte[]>
[-Tenant <TenantId>]
[-Database <LicenseDatabase>]
[-ServerInstance] <String>
[-Force]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Use the Import-NAVServerLicense cmdlet to import a license file into a Business Central database.
If the Business Central Server account specified does not have access to the location where the license file is stored, an error results. Check the Event Log on the Business Central Server computer to see what permissions are required.
After importing a new license, restart all Business Central Server instances to activate the license for client users.
Note
Depending on when you got the license, it will be available as either .flf file only or both a .flf and .bclicense file. We recommend that you use the .bclicense file if available. For more information, see Uploading the License File for Business Central On-Premises.
Import-NAVServerLicense BC -LicenseData ([Byte[]]$(Get-Content -Path "fin.bclicense" -Encoding Byte))
This example imports a license file that is named "fin.bclicense" from the current directory into the default database.
Import-NAVServerLicense MyInstance -LicenseData ([Byte[]]$(Get-Content -Path "fin.bclicense" -Encoding Byte)) -Database NavDatabase
This example imports a license file that is named "fin.bclicense" from the current directory into the local Business Central database that is used by the MyInstance Business Central Server instance.
Import-NAVServerLicense 'MicrosoftDynamicsNavServer$MyInstance' -LicenseData ([Byte[]]$(Get-Content -Path "fin.bclicense" -Encoding Byte)) -Database Master
This example imports a license file that is named "fin.bclicense" from the current directory into the master database.
Import-NAVServerLicense 'MicrosoftDynamicsNavServer$MyInstance' -LicenseData ([Byte[]]$(Get-Content -Path "fin.bclicense" -Encoding Byte)) -Database Tenant -Tenant Tenant1
This example imports a license file that is named "fin.bclicense" from the current directory into the database that is used by the specified tenant, Tenant1.
Prompts you for confirmation before executing the command.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the database into which to import the license file. The possible values are described in the following list:
Default = 0
Default; overrides the license file currently in use.
Master = 1
Forces the license file to be global.
NavDatabase = 2
Forces the license file to be local and stored in the Business Central database that is used by the specified Business Central Server instance.
Tenant = 3
Forces the license file to be local and stored in the Business Central database that is used by the tenant that is specified in the Tenant parameter.
Type: | LicenseDatabase |
Accepted values: | Default, Master, NavDatabase, Tenant |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the content retrieved from the certificate file by using the Get-Content cmdlet. For more information, see the examples.
Type: | Byte[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The LicenseFile parameter specifies the path to the Business Central license file.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
A common PowerShell parameter that determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider. Learn more.
Type: | ActionPreference |
Aliases: | proga |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name of a Business Central Server instance, for example, BC or myinstance. You can specify either the full name of an instance, such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the ID of the tenant in which you want to import the license, such as Tenant1. This parameter is required unless the specified service instance is not configured to run multiple tenants.
Type: | TenantId |
Aliases: | Id |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Describes what would happen if you executed the command without actually executing the command.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
System.String
You can pipe a string that contains a Business Central Server instance name to the cmdlet.