Import-NAVServerLicense
Import-NAVServerLicense
Imports a license file into a Microsoft Dynamics NAV database.
Syntax
Parameter Set: __AllParameterSets
Import-NAVServerLicense [-ServerInstance] <String> [-Database <LicenseDatabase> ] [-Force] [-Tenant <TenantId> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: LicenseDataSet
Import-NAVServerLicense [-LicenseData] <Byte[]> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: LicenseFileSet
Import-NAVServerLicense [-LicenseFile] <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed 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.
Parameters
-Database<LicenseDatabase>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
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 |
-LicenseData<Byte[]>
Specifies the content retrieved from the certificate file by using the Get-Content cmdlet. For more information, see the examples.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-LicenseFile<String>
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ServerInstance<String>
Specifies the name of a Microsoft Dynamics NAV Server instance. The default instance name is DynamicsNAV90. You can specify either the full name of an instance (such as MicrosoftDynamicsNavServer$myinstance) or the short name (such as myinstance).
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 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.
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.
System.String
You can pipe a string that contains a Microsoft Dynamics NAV Server instance name to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
None
This cmdlet does not generate any output.
Examples
-------------------------- EXAMPLE 1 --------------------------
Description
-----------
This example imports a license file that is named "fin.flf" from the current directory into the default database.
C:\PS>Import-NAVServerLicense DynamicsNAV90 -LicenseData ([Byte[]]$(Get-Content -Path "fin.flf" -Encoding Byte))
-------------------------- EXAMPLE 2 --------------------------
Description
-----------
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.
C:\PS>Import-NAVServerLicense MyInstance -LicenseData ([Byte[]]$(Get-Content -Path "fin.flf" -Encoding Byte)) -Database NavDatabase
-------------------------- EXAMPLE 3 --------------------------
Description
-----------
This example imports a license file that is named "fin.flf" from the current directory into the master database.
C:\PS>Import-NAVServerLicense 'MicrosoftDynamicsNavServer$MyInstance' -LicenseData ([Byte[]]$(Get-Content -Path "fin.flf" -Encoding Byte)) -Database Master
-------------------------- EXAMPLE 4 --------------------------
Description
-----------
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.
C:\PS>Import-NAVServerLicense 'MicrosoftDynamicsNavServer$MyInstance' -LicenseData ([Byte[]]$(Get-Content -Path "fin.flf" -Encoding Byte)) -Database Tenant –Tenant Tenant1