Author | Chrissy LeMaire (@cl), netnerds.net |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out New-DbaComputerCertificateSigningRequest on GitHub.
Want to see the Bill Of Health for this command? Check out New-DbaComputerCertificateSigningRequest.
Creates a new computer certificate signing request. Useful for offline servers and Forcing Encryption.
Creates a new computer certificate signing request that is compatible with SQL Server.
By default, a key with a length of 1024 and a friendly name of the machines FQDN is generated.
New-DbaComputerCertificateSigningRequest
[[-ComputerName] <DbaInstanceParameter[]>]
[[-Credential] <PSCredential>]
[[-ClusterInstanceName] <String>]
[[-Path] <String>]
[[-FriendlyName] <String>]
[[-KeyLength] <Int32>]
[[-Dns] <String[]>]
[-EnableException]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PS C:\> New-DbaComputerCertificateSigningRequest
Creates a computer certificate signing request for the local machine with the keylength of 1024.
PS C:\> New-DbaComputerCertificateSigningRequest -ComputerName Server1
Creates a computer certificate signing request for server1 with the keylength of 1024.
PS C:\> New-DbaComputerCertificateSigningRequest -ComputerName sqla, sqlb -ClusterInstanceName sqlcluster -KeyLength 4096
Creates a computer certificate signing request for sqlcluster with the keylength of 4096.
PS C:\> New-DbaComputerCertificateSigningRequest -ComputerName Server1 -WhatIf
Shows what would happen if the command were run
The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must also specify ClusterInstanceName (see below)
Alias | |
Required | False |
Pipeline | true (ByValue) |
Default Value | $env:COMPUTERNAME |
Allows you to login to $ComputerName using alternative credentials.
Alias | |
Required | False |
Pipeline | false |
Default Value |
When creating certs for a cluster, use this parameter to create the certificate for the cluster node name. Use ComputerName for each of the nodes.
Alias | |
Required | False |
Pipeline | false |
Default Value |
The folder to export to.
Alias | |
Required | False |
Pipeline | false |
Default Value | (Get-DbatoolsConfigValue -FullName 'Path.DbatoolsExport') |
The FriendlyName listed in the certificate. This defaults to the FQDN of the $ComputerName
Alias | |
Required | False |
Pipeline | false |
Default Value | SQL Server |
The length of the key - defaults to 1024
Alias | |
Required | False |
Pipeline | false |
Default Value | 1024 |
Specify the Dns entries listed in SAN. By default, it will be ComputerName + FQDN, or in the case of clusters, clustername + cluster FQDN.
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 |
Shows what would happen if the command were to run. No actions are actually performed.
Alias | wi |
Required | False |
Pipeline | false |
Default Value |
Prompts you for confirmation before executing any changing operations within the command.
Alias | cf |
Required | False |
Pipeline | false |
Default Value |