Author | Chrissy LeMaire (@cl), netnerds.net |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Get-DbaProductKey on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaProductKey.
Gets SQL Server Product Keys from local or destination SQL Servers.
This command find the product key for all installed instances. Clustered instances are supported as well.
Get-DbaProductKey
[-ComputerName] <DbaInstanceParameter[]>
[[-SqlCredential] <PSCredential>]
[[-Credential] <PSCredential>]
[-EnableException]
[<CommonParameters>]
PS C:\> Get-DbaProductKey -ComputerName winxp, sqlservera, sqlserver2014a, win2k8
Gets SQL Server versions, editions and product keys for all instances within each server or workstation.
The target SQL Server instance or instances.
Alias | SqlInstance |
Required | True |
Pipeline | true (ByValue) |
Default Value |
This command logs into the SQL instance to gather additional information.
Use this parameter to connect to the discovered SQL instances using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential)
Alias | |
Required | False |
Pipeline | false |
Default Value |
Login to the target Windows instance using alternative credentials. Windows Authentication supported. Accepts credential objects (Get-Credential)
Alias | |
Required | False |
Pipeline | false |
Default Value |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |