API Reference
Export-CertificateForNuGet
Exports a code-signing certificate to DER format for NuGet.org registration.
Remarks
NuGet.org requires uploading the public certificate (.cer) used for package signing. This cmdlet exports the selected certificate from the local certificate store.
Examples
Export by thumbprint
PS>
Export-CertificateForNuGet -CertificateThumbprint '0123456789ABCDEF' -OutputPath (Join-Path $env:TEMP 'NuGetSigning.cer')
Exports the certificate in DER format to the given path.
Export by SHA256 hash
PS>
Export-CertificateForNuGet -CertificateSha256 '0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF'
Useful when you have the SHA256 fingerprint but not the Windows thumbprint.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Export-CertificateForNuGet -CertificateThumbprint <String> [-LocalStore <CurrentUser|LocalMachine>] [-OutputPath <String>] [<CommonParameters>]
#
ThumbprintParameters
- CertificateThumbprint String
- The SHA1 thumbprint of the certificate to export.
- LocalStore CertificateStoreLocation
- Certificate store location to use.
- Possible values:
CurrentUser,LocalMachine - OutputPath String
- Output path for the exported .cer file.
Outputs
PowerForge.NuGetCertificateExportResult
Export-CertificateForNuGet -CertificateSha256 <String> [-LocalStore <CurrentUser|LocalMachine>] [-OutputPath <String>] [<CommonParameters>]
#
Sha256Parameters
- CertificateSha256 String
- The SHA256 hash of the certificate to export.
- LocalStore CertificateStoreLocation
- Certificate store location to use.
- Possible values:
CurrentUser,LocalMachine - OutputPath String
- Output path for the exported .cer file.
Outputs
PowerForge.NuGetCertificateExportResult