Import-NAVServerLicense

Import-NAVServerLicense

Imports a license file into a Microsoft Dynamics NAV database.

Syntax

Parameter Set: __AllParameterSets
Import-NAVServerLicense [-ServerInstance] <String> [-LicenseData] <Byte[]> [-Database <LicenseDatabase> ] [ <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. You can use the following special values:

0 or Default = Default; overrides the license file currently in use.

1 or Master = Forces the license file to be global.

2 or NavDatabase = 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.


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

-ServerInstance<String>

Specifies the name of a Microsoft Dynamics NAV Server instance. The default instance name is DynamicsNAV70. 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

<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 DynamicsNAV70 -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

Show: