This cmdlet installs or updates a license onto the current host. Licenses are host-specific, but can be exported and imported between hosts.
PowerShell | ParameterSet: "Key (Default)"
Install-License
- -LicenseKey
PowerShell | ParameterSet: "File"
Install-License
- -FileName
PowerShell | ParameterSet: "Clip"
Install-License
- -GetLicenseKeyFromClipboard
Description
The Install-License cmdlet installs a paid-use license on to the current host.
Licenses are host-specific, meaning that a license can only be installed on the host from which the license request was generated. Licenses can be exported from one host and imported onto another host using the Export-License and Import-License cmdlets.
Examples
Example 1
PowerShell
Install-License >LicenseKey: 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000
In this example, no parameters are used which causes the cmdlet to default to the LicenseKey parameter. When the LicenseKey parameter is not provided, or is empty, PowerShell will prompt for the required parameter, which allows for the pasting of a multi-line key value.
Example 2
PowerShell
Install-License -LicenseKey 00a0a0a0a0d9d9d9d8f8gf9ag7878fasg87sa8fga68f7a687ga78f6g87a6sd
This example installs a license using a single-line version of a license key.
Example 3
PowerShell
Install-License -FileName c:\path\to\folder\license.file.name.lic
This example uses the FileName parameter to specify the name of a file that contains the license key text.
Example 4
PowerShell
Install-License -GetLicenseKeyFromClipboard
This example will attempt to use whatever text is in the windows clipboard at the time it is run. Note: this version of Install-License will only function in an interactive window.
Parameters
-LicenseKey
The license key text returned after purchasing a license.
-FileName
The FileName parameter specifies the path and name of a file that contains the license key text.
-GetLicenseKeyFromClipboard
This parameter causes the cmdlet to look for a license key in the windows clipboard. This parameter can only be used in interactive PowerShell sessions.
Output
This cmdlet does not place any objects on the pipeline.
