Edit

Share via


Install-VamtProductKey

Installs the specified product key on a product or a group of products.

Syntax

Default (Default)

Install-VamtProductKey
    -Products <Product[]>
    -ProductKey <String>
    [-DbConnectionString <String>]
    [-Username <String>]
    [-Password <String>]
    [-DbCommandTimeout <Int32>]
    [<CommonParameters>]

Description

The Install-VamtProductKey cmdlet installs the specified product key on a single product or on a group of products. The cmdlet returns a value to indicate whether the product key is valid.

Examples

Example 1: Install a product key

PS C:\> $Product = Get-VamtProduct | where { $_.fullyqualifieddomainname -eq 'mymachine' }
PS C:\> Install-VamtProductKey -Products $Product -ProductKey "12345-67890-12345-67890-12345"

This command gets a specified product by using the fully qualified domain name and then installs the specified product key on that product.

Parameters

-DbCommandTimeout

Indicates how long dep_nextref_vamt waits for a response from the database before timing out. The default value is 30 seconds.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DbConnectionString

Specifies the database where the product keys are installed. If no database connection string is provided, dep_nextref_vamt attempts to use the database that the dep_nextref_vamt user console used on the local computer. If dep_nextref_vamt does not find a database, it returns an error. You can find the connection string in the dep_nextref_vamt UI in the Preferences dialog box. On the menu bar, click View, and then click Preferences to open the Volume Activation Management Tool Preferences dialog box. The connection string is in the Database Settings section under Current connection string.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Password

Provides a password for password-protected environments.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ProductKey

Specifies the product key to be installed on the product or products.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Products

Specifies the product or products to install the product key.

Parameter properties

Type:

Product[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Username

Provides a user name for password-protected environments.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.