powershell / selfsignedcertificate Goto Github PK
View Code? Open in Web Editor NEWA module for generating self-signed certificates in PowerShell Core
License: MIT License
A module for generating self-signed certificates in PowerShell Core
License: MIT License
Anyway to get private key in the pfx?
Hi,
I have installed your module, and have attempted to generate a PFX for Azure AD, but it returned an error as per below:
Cheers,
Damien
PS /home/tusker/dev> $password = ConvertTo-SecureString -Force -AsPlainText 'tusker'
PS /home/tusker/dev> $distinguishedName = @{
>> CommonName = 'tusker.onmicrosoft.com'
>> Country = 'AU'
>> StateOrProvince = 'NSW'
>> Locality = 'Sydney'
>> Organization = 'Tusker Technologies Pty Ltd'
>> OrganizationalUnit = 'PSE'
>> EmailAddress = '[email protected]'
>> }
PS /home/tusker/dev> $certificateParameters = $distinguishedName + @{
>> OutCertPath = '/home/tusker/dev/tusker.pfx'
>> StartDate = [System.DateTimeOffset]::Now
>> Duration = [timespan]::FromDays(365)
>> Passphrase = $password
>> CertificateFormat = 'Pfx'
>> KeyLength = 4096
>> ForCertificateAuthority = $true
>> KeyUsage = 'DigitalSignature','KeyEncipherment'
>> EnhancedKeyUsage = 'ServerAuthentication','ClientAuthentication'
>> }
PS /home/tusker/dev> New-SelfSignedCertificate @certificateParameters -Force
New-SelfSignedCertificate : Cannot process argument transformation on parameter 'NotBefore'. Cannot convert the "7/5/19 7:13:14 PM +10:00" value of type "System.DateTimeOffset" to type "System.DateTime".
At line:1 char:27
+ New-SelfSignedCertificate @certificateParameters -Force
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [New-SelfSignedCertificate], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,New-SelfSignedCertificate
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.