Import-NAVServerLicense
Imports a license file into a Microsoft Dynamics NAV database.
Syntax
Import-NAVServerLicense
[-Tenant <TenantId>]
[-LicenseFile] <String>
[-Database <LicenseDatabase>]
[-ServerInstance] <String>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Import-NAVServerLicense
[-LicenseData] <Byte[]>
[-Tenant <TenantId>]
[-Database <LicenseDatabase>]
[-ServerInstance] <String>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Use the Import-NAVServerLicense cmdlet to import a license file into a Microsoft Dynamics NAV database.
If the Microsoft Dynamics NAV 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 Microsoft Dynamics NAV Server computer to see what permissions are required.
After importing a new license, restart all Microsoft Dynamics NAV Server instances to activate the license for client users.
Examples
EXAMPLE 1
Import-NAVServerLicense DynamicsNAV -LicenseData ([Byte[]]$(Get-Content -Path "fin.flf" -Encoding Byte))
This example imports a license file that is named "fin.flf" from the current directory into the default database.
EXAMPLE 2
Import-NAVServerLicense MyInstance -LicenseData ([Byte[]]$(Get-Content -Path "fin.flf" -Encoding Byte)) -Database NavDatabase
This example imports a license file that is named "fin.flf" from the current directory into the local Microsoft Dynamics NAV database that is used by the MyInstance Microsoft Dynamics NAV Server instance.
EXAMPLE 3
Import-NAVServerLicense 'MicrosoftDynamicsNavServer$MyInstance' -LicenseData ([Byte[]]$(Get-Content -Path "fin.flf" -Encoding Byte)) -Database Master
This example imports a license file that is named "fin.flf" from the current directory into the master database.
EXAMPLE 4
Import-NAVServerLicense 'MicrosoftDynamicsNavServer$MyInstance' -LicenseData ([Byte[]]$(Get-Content -Path "fin.flf" -Encoding Byte)) -Database Tenant -Tenant Tenant1
This example imports a license file that is named "fin.flf" from the current directory into the database that is used by the specified tenant, Tenant1.
Parameters
-Confirm
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 |
-Database
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 Microsoft Dynamics NAV database that is used by the specified Microsoft Dynamics NAV Server instance.
Tenant = 3
Forces the license file to be local and stored in the Microsoft Dynamics NAV 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 |
-Force
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 |
-LicenseData
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 |
-LicenseFile
The LicenseFile parameter specifies the path to the Microsoft Dynamics NAV license file.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServerInstance
Specifies the name of a Dynamics NAV Server instance, for example, DynamicsNAV 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 |
-Tenant
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 |
-WhatIf
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 |
Inputs
System.String
You can pipe a string that contains a Microsoft Dynamics NAV Server instance name to the cmdlet.