< Back
Remove-TrustedPublisherCert
Post
NAME Remove-TrustedPublisherCert
SYNOPSIS
Remove a certificate from the trusted publisher container of the local machine certificate store
SYNTAX
Remove-TrustedPublisherCert [[-certfile] <String>] [[-thumbprint] <String>] [<CommonParameters>]
DESCRIPTION
Remove a certificate from the trusted publisher container of the local machine certificate store
PARAMETERS
-certfile <String>
-certfile certfile{full file path to a valid CER file}
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-thumbprint <String>
-thumbprint string{valid thumbprint of a certificate already installed in the trusted published container}
Required? false
Position? 2
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
TypeName : System.Security.Cryptography.X509Certificates.X509Certificate2
Name MemberType Definition
---- ---------- ----------
Dispose Method void Dispose(), void IDisposable.Dispose()
Equals Method bool Equals(System.Object obj), bool Equals(X509Certificate other)
Export Method byte[]
Export(System.Security.Cryptography.X509Certificates.X509Conte...
GetCertHash Method byte[] GetCertHash()
GetCertHashString Method string GetCertHashString()
GetEffectiveDateString Method string GetEffectiveDateString()
GetExpirationDateString Method string GetExpirationDateString()
GetFormat Method string GetFormat()
GetHashCode Method int GetHashCode()
GetIssuerName Method string GetIssuerName()
GetKeyAlgorithm Method string GetKeyAlgorithm()
GetKeyAlgorithmParameters Method byte[] GetKeyAlgorithmParameters()
GetKeyAlgorithmParametersString Method string GetKeyAlgorithmParametersString()
GetName Method string GetName()
GetNameInfo Method string
GetNameInfo(System.Security.Cryptography.X509Certificates.X509...
GetObjectData Method void
ISerializable.GetObjectData(System.Runtime.Serialization.Seriali...
GetPublicKey Method byte[] GetPublicKey()
GetPublicKeyString Method string GetPublicKeyString()
GetRawCertData Method byte[] GetRawCertData()
GetRawCertDataString Method string GetRawCertDataString()
GetSerialNumber Method byte[] GetSerialNumber()
GetSerialNumberString Method string GetSerialNumberString()
GetType Method type GetType()
Import Method void Import(byte[] rawData), void Import(byte[] rawData, string
passw...
OnDeserialization Method void IDeserializationCallback.OnDeserialization(System.Object
sender)
Reset Method void Reset()
ToString Method string ToString(), string ToString(bool verbose)
Verify Method bool Verify()
Archived Property bool Archived {get;set;}
Extensions Property
System.Security.Cryptography.X509Certificates.X509ExtensionCollection...
FriendlyName Property string FriendlyName {get;set;}
Handle Property System.IntPtr Handle {get;}
HasPrivateKey Property bool HasPrivateKey {get;}
Issuer Property string Issuer {get;}
IssuerName Property X500DistinguishedName IssuerName {get;}
NotAfter Property datetime NotAfter {get;}
NotBefore Property datetime NotBefore {get;}
PrivateKey Property System.Security.Cryptography.AsymmetricAlgorithm PrivateKey
{get;set;}
PublicKey Property System.Security.Cryptography.X509Certificates.PublicKey PublicKey
{get;}
RawData Property byte[] RawData {get;}
SerialNumber Property string SerialNumber {get;}
SignatureAlgorithm Property System.Security.Cryptography.Oid SignatureAlgorithm {get;}
Subject Property string Subject {get;}
SubjectName Property X500DistinguishedName SubjectName {get;}
Thumbprint Property string Thumbprint {get;}
Version Property int Version {get;}
DnsNameList ScriptProperty System.Object DnsNameList {get=,(new-object
Microsoft.Powershell.Comm...
EnhancedKeyUsageList ScriptProperty System.Object EnhancedKeyUsageList {get=,(new-object
Microsoft.Powers...
SendAsTrustedIssuer ScriptProperty System.Object SendAsTrustedIssuer
{get=[Microsoft.Powershell.Commands...
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove certificatessign.cer from the Trusted Publisher container of the local machine certificate store
C:\\PS> Remove-TrustedPublisherCert -certfile "c:\\test\\certificatessign.cer"
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>remove certificate with thumprint xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx from the Trusted Publisher
container of local machine certificate store
C:\\PS> Check-TrustedPublisherCert -thumbprint "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
RELATED LINKS
SYNOPSIS
Remove a certificate from the trusted publisher container of the local machine certificate store
SYNTAX
Remove-TrustedPublisherCert [[-certfile] <String>] [[-thumbprint] <String>] [<CommonParameters>]
DESCRIPTION
Remove a certificate from the trusted publisher container of the local machine certificate store
PARAMETERS
-certfile <String>
-certfile certfile{full file path to a valid CER file}
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-thumbprint <String>
-thumbprint string{valid thumbprint of a certificate already installed in the trusted published container}
Required? false
Position? 2
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
TypeName : System.Security.Cryptography.X509Certificates.X509Certificate2
Name MemberType Definition
---- ---------- ----------
Dispose Method void Dispose(), void IDisposable.Dispose()
Equals Method bool Equals(System.Object obj), bool Equals(X509Certificate other)
Export Method byte[]
Export(System.Security.Cryptography.X509Certificates.X509Conte...
GetCertHash Method byte[] GetCertHash()
GetCertHashString Method string GetCertHashString()
GetEffectiveDateString Method string GetEffectiveDateString()
GetExpirationDateString Method string GetExpirationDateString()
GetFormat Method string GetFormat()
GetHashCode Method int GetHashCode()
GetIssuerName Method string GetIssuerName()
GetKeyAlgorithm Method string GetKeyAlgorithm()
GetKeyAlgorithmParameters Method byte[] GetKeyAlgorithmParameters()
GetKeyAlgorithmParametersString Method string GetKeyAlgorithmParametersString()
GetName Method string GetName()
GetNameInfo Method string
GetNameInfo(System.Security.Cryptography.X509Certificates.X509...
GetObjectData Method void
ISerializable.GetObjectData(System.Runtime.Serialization.Seriali...
GetPublicKey Method byte[] GetPublicKey()
GetPublicKeyString Method string GetPublicKeyString()
GetRawCertData Method byte[] GetRawCertData()
GetRawCertDataString Method string GetRawCertDataString()
GetSerialNumber Method byte[] GetSerialNumber()
GetSerialNumberString Method string GetSerialNumberString()
GetType Method type GetType()
Import Method void Import(byte[] rawData), void Import(byte[] rawData, string
passw...
OnDeserialization Method void IDeserializationCallback.OnDeserialization(System.Object
sender)
Reset Method void Reset()
ToString Method string ToString(), string ToString(bool verbose)
Verify Method bool Verify()
Archived Property bool Archived {get;set;}
Extensions Property
System.Security.Cryptography.X509Certificates.X509ExtensionCollection...
FriendlyName Property string FriendlyName {get;set;}
Handle Property System.IntPtr Handle {get;}
HasPrivateKey Property bool HasPrivateKey {get;}
Issuer Property string Issuer {get;}
IssuerName Property X500DistinguishedName IssuerName {get;}
NotAfter Property datetime NotAfter {get;}
NotBefore Property datetime NotBefore {get;}
PrivateKey Property System.Security.Cryptography.AsymmetricAlgorithm PrivateKey
{get;set;}
PublicKey Property System.Security.Cryptography.X509Certificates.PublicKey PublicKey
{get;}
RawData Property byte[] RawData {get;}
SerialNumber Property string SerialNumber {get;}
SignatureAlgorithm Property System.Security.Cryptography.Oid SignatureAlgorithm {get;}
Subject Property string Subject {get;}
SubjectName Property X500DistinguishedName SubjectName {get;}
Thumbprint Property string Thumbprint {get;}
Version Property int Version {get;}
DnsNameList ScriptProperty System.Object DnsNameList {get=,(new-object
Microsoft.Powershell.Comm...
EnhancedKeyUsageList ScriptProperty System.Object EnhancedKeyUsageList {get=,(new-object
Microsoft.Powers...
SendAsTrustedIssuer ScriptProperty System.Object SendAsTrustedIssuer
{get=[Microsoft.Powershell.Commands...
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove certificatessign.cer from the Trusted Publisher container of the local machine certificate store
C:\\PS> Remove-TrustedPublisherCert -certfile "c:\\test\\certificatessign.cer"
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>remove certificate with thumprint xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx from the Trusted Publisher
container of local machine certificate store
C:\\PS> Check-TrustedPublisherCert -thumbprint "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
RELATED LINKS