< Back
Remove-DbaComputerCertificate
Post
NAME Remove-DbaComputerCertificate
SYNOPSIS
Removes a computer certificate - useful for removing easily certs from remote computers
SYNTAX
Remove-DbaComputerCertificate [[-ComputerName] <Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]
[[-Credential] <Pscredential>] [-Thumbprint] <System.String[]> [[-Store] <String>] [[-Folder] <String>]
[-EnableException <Switch>] [<CommonParameters>]
DESCRIPTION
Removes a computer certificate from a local or remote compuer
PARAMETERS
-ComputerName [<Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]
The target computer. Defaults to localhost.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Credential [<Pscredential>]
Allows you to login to $ComputerName using alternative credentials
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-EnableException [<Switch>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Folder [<String>]
Certificate folder
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Store [<String>]
Certificate store - defaults to LocalMachine (otherwise exceptions can be thrown on remote connections)
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Thumbprint [<System.String[]>]
The thumbprint of the certificate object
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Tags: Certificate
Author: Chrissy LeMaire (@cl), netnerds.net
Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-DbaComputerCertificate -ComputerName Server1 -Thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94
Removes certificate with thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 in the LocalMachine store on Server1
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-DbaComputerCertificate | Where-Object Thumbprint -eq E0A071E387396723C45E92D42B2D497C6A182340 |
Remove-DbaComputerCertificate
Removes certificate using the pipeline
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Remove-DbaComputerCertificate -ComputerName Server1 -Thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94
-Store User -Folder My
Removes certificate with thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 in the User\\My (Personal) store on
Server1
RELATED LINKS
https://dbatools.io/Remove-DbaComputerCertificate
SYNOPSIS
Removes a computer certificate - useful for removing easily certs from remote computers
SYNTAX
Remove-DbaComputerCertificate [[-ComputerName] <Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]
[[-Credential] <Pscredential>] [-Thumbprint] <System.String[]> [[-Store] <String>] [[-Folder] <String>]
[-EnableException <Switch>] [<CommonParameters>]
DESCRIPTION
Removes a computer certificate from a local or remote compuer
PARAMETERS
-ComputerName [<Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]
The target computer. Defaults to localhost.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Credential [<Pscredential>]
Allows you to login to $ComputerName using alternative credentials
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-EnableException [<Switch>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Folder [<String>]
Certificate folder
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Store [<String>]
Certificate store - defaults to LocalMachine (otherwise exceptions can be thrown on remote connections)
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Thumbprint [<System.String[]>]
The thumbprint of the certificate object
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Tags: Certificate
Author: Chrissy LeMaire (@cl), netnerds.net
Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-DbaComputerCertificate -ComputerName Server1 -Thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94
Removes certificate with thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 in the LocalMachine store on Server1
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-DbaComputerCertificate | Where-Object Thumbprint -eq E0A071E387396723C45E92D42B2D497C6A182340 |
Remove-DbaComputerCertificate
Removes certificate using the pipeline
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Remove-DbaComputerCertificate -ComputerName Server1 -Thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94
-Store User -Folder My
Removes certificate with thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 in the User\\My (Personal) store on
Server1
RELATED LINKS
https://dbatools.io/Remove-DbaComputerCertificate