{"id":21406851,"url":"https://github.com/ms-luf/manage-trustedpublisher","last_synced_at":"2025-03-16T17:17:36.168Z","repository":{"id":137505300,"uuid":"120214289","full_name":"MS-LUF/Manage-TrustedPublisher","owner":"MS-LUF","description":"Simple powershell module to manage code signing certificate in trusted publisher container on Windows computers and servers","archived":false,"fork":false,"pushed_at":"2019-05-15T22:08:06.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T04:11:44.529Z","etag":null,"topics":["certificates","powershell","powershell-module","publisher","trusted"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MS-LUF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-04T19:09:00.000Z","updated_at":"2024-08-12T15:51:10.000Z","dependencies_parsed_at":"2023-03-15T07:45:41.833Z","dependency_job_id":null,"html_url":"https://github.com/MS-LUF/Manage-TrustedPublisher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MS-LUF%2FManage-TrustedPublisher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MS-LUF%2FManage-TrustedPublisher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MS-LUF%2FManage-TrustedPublisher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MS-LUF%2FManage-TrustedPublisher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MS-LUF","download_url":"https://codeload.github.com/MS-LUF/Manage-TrustedPublisher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902321,"owners_count":20366262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["certificates","powershell","powershell-module","publisher","trusted"],"created_at":"2024-11-22T16:43:06.928Z","updated_at":"2025-03-16T17:17:36.137Z","avatar_url":"https://github.com/MS-LUF.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](https://www.lucas-cueff.com/files/gallery.png)\n# Manage-TrustedPublisher\nSimple powershell module to manage code signing certificate in trusted publisher container on Windows computers and servers\n\n(c) 2018-2019 lucas-cueff.com Distributed under Artistic Licence 2.0 (https://opensource.org/licenses/artistic-license-2.0).\n\n## install Manage-TrustedPublisher from PowerShell Gallery repository\nYou can easily install it from powershell gallery repository\nhttps://www.powershellgallery.com/packages/Manage-TrustedPublisher/\nusing a simple powershell command and an internet access :-) \n```\n\tInstall-Module -Name Manage-TrustedPublisher\n```\n## import module from PowerShell \n```\t\n\t.EXAMPLE\n\tC:\\PS\u003e import-module Manage-TrustedPublisher.psd1\n  \n```\n## module content\n### Import-TrustedPublisherCert function\n ```\n \t\t.SYNOPSIS \n\t\timport a certificate file in the trusted publisher container of the local machine certificate store\n\t\n\t\t.DESCRIPTION\n\t\timport a certificate file in the trusted publisher container of the local machine certificate store\n\t\n\t\t.PARAMETER certfile\n\t\tMandatory parameter\n\t\t-certfile certfile{full file path to a valid CER file}\n\t\n\t\t.OUTPUTS\n\t\t   TypeName : System.Security.Cryptography.X509Certificates.X509Certificate2\n\n\t\t\tName                            MemberType     Definition\n\t\t\t----                            ----------     ----------\n\t\t\tDispose                         Method         void Dispose(), void IDisposable.Dispose()\n\t\t\tEquals                          Method         bool Equals(System.Object obj), bool Equals(X509Certificate other)\n\t\t\tExport                          Method         byte[] Export(System.Security.Cryptography.X509Certificates.X509Conte...\n\t\t\tGetCertHash                     Method         byte[] GetCertHash()\n\t\t\tGetCertHashString               Method         string GetCertHashString()\n\t\t\tGetEffectiveDateString          Method         string GetEffectiveDateString()\n\t\t\tGetExpirationDateString         Method         string GetExpirationDateString()\n\t\t\tGetFormat                       Method         string GetFormat()\n\t\t\tGetHashCode                     Method         int GetHashCode()\n\t\t\tGetIssuerName                   Method         string GetIssuerName()\n\t\t\tGetKeyAlgorithm                 Method         string GetKeyAlgorithm()\n\t\t\tGetKeyAlgorithmParameters       Method         byte[] GetKeyAlgorithmParameters()\n\t\t\tGetKeyAlgorithmParametersString Method         string GetKeyAlgorithmParametersString()\n\t\t\tGetName                         Method         string GetName()\n\t\t\tGetNameInfo                     Method         string GetNameInfo(System.Security.Cryptography.X509Certificates.X509...\n\t\t\tGetObjectData                   Method         void ISerializable.GetObjectData(System.Runtime.Serialization.Seriali...\n\t\t\tGetPublicKey                    Method         byte[] GetPublicKey()\n\t\t\tGetPublicKeyString              Method         string GetPublicKeyString()\n\t\t\tGetRawCertData                  Method         byte[] GetRawCertData()\n\t\t\tGetRawCertDataString            Method         string GetRawCertDataString()\n\t\t\tGetSerialNumber                 Method         byte[] GetSerialNumber()\n\t\t\tGetSerialNumberString           Method         string GetSerialNumberString()\n\t\t\tGetType                         Method         type GetType()\n\t\t\tImport                          Method         void Import(byte[] rawData), void Import(byte[] rawData, string passw...\n\t\t\tOnDeserialization               Method         void IDeserializationCallback.OnDeserialization(System.Object sender)\n\t\t\tReset                           Method         void Reset()\n\t\t\tToString                        Method         string ToString(), string ToString(bool verbose)\n\t\t\tVerify                          Method         bool Verify()\n\t\t\tArchived                        Property       bool Archived {get;set;}\n\t\t\tExtensions                      Property       System.Security.Cryptography.X509Certificates.X509ExtensionCollection...\n\t\t\tFriendlyName                    Property       string FriendlyName {get;set;}\n\t\t\tHandle                          Property       System.IntPtr Handle {get;}\n\t\t\tHasPrivateKey                   Property       bool HasPrivateKey {get;}\n\t\t\tIssuer                          Property       string Issuer {get;}\n\t\t\tIssuerName                      Property       X500DistinguishedName IssuerName {get;}\n\t\t\tNotAfter                        Property       datetime NotAfter {get;}\n\t\t\tNotBefore                       Property       datetime NotBefore {get;}\n\t\t\tPrivateKey                      Property       System.Security.Cryptography.AsymmetricAlgorithm PrivateKey {get;set;}\n\t\t\tPublicKey                       Property       System.Security.Cryptography.X509Certificates.PublicKey PublicKey {get;}\n\t\t\tRawData                         Property       byte[] RawData {get;}\n\t\t\tSerialNumber                    Property       string SerialNumber {get;}\n\t\t\tSignatureAlgorithm              Property       System.Security.Cryptography.Oid SignatureAlgorithm {get;}\n\t\t\tSubject                         Property       string Subject {get;}\n\t\t\tSubjectName                     Property       X500DistinguishedName SubjectName {get;}\n\t\t\tThumbprint                      Property       string Thumbprint {get;}\n\t\t\tVersion                         Property       int Version {get;}\n\t\t\tDnsNameList                     ScriptProperty System.Object DnsNameList {get=,(new-object Microsoft.Powershell.Comm...\n\t\t\tEnhancedKeyUsageList            ScriptProperty System.Object EnhancedKeyUsageList {get=,(new-object Microsoft.Powers...\n\t\t\tSendAsTrustedIssuer             ScriptProperty System.Object SendAsTrustedIssuer {get=[Microsoft.Powershell.Commands...\n\t\n\t\t.EXAMPLE\n\t\tadd certificatessign.cer to the Trusted Publisher container of the local machine certificate store\n\t\tC:\\PS\u003e Import-TrustedPublisherCert -certfile \"c:\\test\\certificatessign.cer\"\n ```\n ### Remove-TrustedPublisherCert function\n ```\n \t\t.SYNOPSIS \n\t\tRemove a certificate from the trusted publisher container of the local machine certificate store\n\t\n\t\t.DESCRIPTION\n\t\tRemove a certificate from the trusted publisher container of the local machine certificate store\n\t\n\t\t.PARAMETER certfile\n\t\t-certfile certfile{full file path to a valid CER file}\n\n\t\t.PARAMETER thumbprint\n\t\t-thumbprint string{valid thumbprint of a certificate already installed in the trusted published container}\n\t\n\t\t.OUTPUTS\n\t\t   TypeName : System.Security.Cryptography.X509Certificates.X509Certificate2\n\n\t\t   \tName                            MemberType     Definition\n\t\t\t----                            ----------     ----------\n\t\t\tDispose                         Method         void Dispose(), void IDisposable.Dispose()\n\t\t\tEquals                          Method         bool Equals(System.Object obj), bool Equals(X509Certificate other)\n\t\t\tExport                          Method         byte[] Export(System.Security.Cryptography.X509Certificates.X509Conte...\n\t\t\tGetCertHash                     Method         byte[] GetCertHash()\n\t\t\tGetCertHashString               Method         string GetCertHashString()\n\t\t\tGetEffectiveDateString          Method         string GetEffectiveDateString()\n\t\t\tGetExpirationDateString         Method         string GetExpirationDateString()\n\t\t\tGetFormat                       Method         string GetFormat()\n\t\t\tGetHashCode                     Method         int GetHashCode()\n\t\t\tGetIssuerName                   Method         string GetIssuerName()\n\t\t\tGetKeyAlgorithm                 Method         string GetKeyAlgorithm()\n\t\t\tGetKeyAlgorithmParameters       Method         byte[] GetKeyAlgorithmParameters()\n\t\t\tGetKeyAlgorithmParametersString Method         string GetKeyAlgorithmParametersString()\n\t\t\tGetName                         Method         string GetName()\n\t\t\tGetNameInfo                     Method         string GetNameInfo(System.Security.Cryptography.X509Certificates.X509...\n\t\t\tGetObjectData                   Method         void ISerializable.GetObjectData(System.Runtime.Serialization.Seriali...\n\t\t\tGetPublicKey                    Method         byte[] GetPublicKey()\n\t\t\tGetPublicKeyString              Method         string GetPublicKeyString()\n\t\t\tGetRawCertData                  Method         byte[] GetRawCertData()\n\t\t\tGetRawCertDataString            Method         string GetRawCertDataString()\n\t\t\tGetSerialNumber                 Method         byte[] GetSerialNumber()\n\t\t\tGetSerialNumberString           Method         string GetSerialNumberString()\n\t\t\tGetType                         Method         type GetType()\n\t\t\tImport                          Method         void Import(byte[] rawData), void Import(byte[] rawData, string passw...\n\t\t\tOnDeserialization               Method         void IDeserializationCallback.OnDeserialization(System.Object sender)\n\t\t\tReset                           Method         void Reset()\n\t\t\tToString                        Method         string ToString(), string ToString(bool verbose)\n\t\t\tVerify                          Method         bool Verify()\n\t\t\tArchived                        Property       bool Archived {get;set;}\n\t\t\tExtensions                      Property       System.Security.Cryptography.X509Certificates.X509ExtensionCollection...\n\t\t\tFriendlyName                    Property       string FriendlyName {get;set;}\n\t\t\tHandle                          Property       System.IntPtr Handle {get;}\n\t\t\tHasPrivateKey                   Property       bool HasPrivateKey {get;}\n\t\t\tIssuer                          Property       string Issuer {get;}\n\t\t\tIssuerName                      Property       X500DistinguishedName IssuerName {get;}\n\t\t\tNotAfter                        Property       datetime NotAfter {get;}\n\t\t\tNotBefore                       Property       datetime NotBefore {get;}\n\t\t\tPrivateKey                      Property       System.Security.Cryptography.AsymmetricAlgorithm PrivateKey {get;set;}\n\t\t\tPublicKey                       Property       System.Security.Cryptography.X509Certificates.PublicKey PublicKey {get;}\n\t\t\tRawData                         Property       byte[] RawData {get;}\n\t\t\tSerialNumber                    Property       string SerialNumber {get;}\n\t\t\tSignatureAlgorithm              Property       System.Security.Cryptography.Oid SignatureAlgorithm {get;}\n\t\t\tSubject                         Property       string Subject {get;}\n\t\t\tSubjectName                     Property       X500DistinguishedName SubjectName {get;}\n\t\t\tThumbprint                      Property       string Thumbprint {get;}\n\t\t\tVersion                         Property       int Version {get;}\n\t\t\tDnsNameList                     ScriptProperty System.Object DnsNameList {get=,(new-object Microsoft.Powershell.Comm...\n\t\t\tEnhancedKeyUsageList            ScriptProperty System.Object EnhancedKeyUsageList {get=,(new-object Microsoft.Powers...\n\t\t\tSendAsTrustedIssuer             ScriptProperty System.Object SendAsTrustedIssuer {get=[Microsoft.Powershell.Commands...\n\t\n\t\t.EXAMPLE\n\t\tRemove certificatessign.cer from the Trusted Publisher container of the local machine certificate store\n\t\tC:\\PS\u003e Remove-TrustedPublisherCert -certfile \"c:\\test\\certificatessign.cer\"\n\n\t\t.EXAMPLE\n\t\tremove certificate with thumprint xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx from the Trusted Publisher container of local machine certificate store\n\t\tC:\\PS\u003e Check-TrustedPublisherCert -thumbprint \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n ```\n ### Check-TrustedPublisherCert function\n ```\n\t\t.SYNOPSIS \n\t\tcheck if a certificate is installed in the trusted publisher container of the local machine certificate store\n\t\n\t\t.DESCRIPTION\n\t\tcheck if a certificate is installed in the trusted publisher container of the local machine certificate store\n\t\n\t\t.PARAMETER certfile\n\t\t-certfile certfile{full file path to a valid CER file}\n\n\t\t.PARAMETER thumbprint\n\t\t-thumbprint string{valid thumbprint of a certificate already installed in the trusted published container}\n\t\n\t\t.OUTPUTS\n\t\tTypeName : boolean\n\t\n\t\t.EXAMPLE\n\t\tcheck if certificatessign.cer is already added in Trusted Publisher container of local machine certificate store\n\t\tC:\\PS\u003e Check-TrustedPublisherCert -certfile \"c:\\test\\certificatessign.cer\"\n\n\t\t.EXAMPLE\n\t\tcheck if certificate with thumprint xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is already added in Trusted Publisher container of local machine certificate store\n\t\tC:\\PS\u003e Check-TrustedPublisherCert -thumbprint \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n  ``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fms-luf%2Fmanage-trustedpublisher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fms-luf%2Fmanage-trustedpublisher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fms-luf%2Fmanage-trustedpublisher/lists"}