From c098601a3407c71e1ad9c9b24018a8970fe60d1e Mon Sep 17 00:00:00 2001 From: Justin Johns Date: Sun, 14 Apr 2024 20:17:03 -0700 Subject: [PATCH] Update readme (#22) * Update readme * added linux install instructions * update documentation * fixed typo --- Build/depend.psd1 | 2 +- Documentation/ConvertFrom-PKCS7.md | 134 ++--- Documentation/ConvertTo-PEM.md | 164 +++--- Documentation/Export-CertificateData.md | 174 +++--- Documentation/Export-PFX.md | 288 +++++----- Documentation/Get-CSRData.md | 104 ++-- Documentation/Get-CertificateData.md | 104 ++-- Documentation/Get-RemoteSSLCertificate.md | 150 ++--- .../New-CertificateSigningRequest.md | 505 ++++++++--------- Documentation/New-SelfSignedCertificate.md | 526 +++++++++--------- Documentation/Test-Cipher.md | 174 +++--- Documentation/Test-Protocol.md | 172 +++--- Documentation/Test-SSLProtocol.md | 140 ++--- Documentation/index.md | 27 +- README.md | 27 +- 15 files changed, 1357 insertions(+), 1334 deletions(-) diff --git a/Build/depend.psd1 b/Build/depend.psd1 index 067047c..2f5bdd2 100644 --- a/Build/depend.psd1 +++ b/Build/depend.psd1 @@ -20,5 +20,5 @@ PlatyPS = '0.14.2' psake = '4.9.0' #PSDeploy = '1.0.5' - PSScriptAnalyzer = '1.21.0' + PSScriptAnalyzer = '1.22.0' } diff --git a/Documentation/ConvertFrom-PKCS7.md b/Documentation/ConvertFrom-PKCS7.md index a41f422..ecb2a9b 100644 --- a/Documentation/ConvertFrom-PKCS7.md +++ b/Documentation/ConvertFrom-PKCS7.md @@ -1,67 +1,67 @@ -# ConvertFrom-PKCS7 - -## SYNOPSIS -Convert PKCS7 formatted certificate - -## SYNTAX - -``` -ConvertFrom-PKCS7 [-Path] [[-OutputDirectory] ] [] -``` - -## DESCRIPTION -Convert PKCS7 formatted certificate to non-PKCS7 format - -## EXAMPLES - -### EXAMPLE 1 -``` -ConvertFrom-PKCS7 -Path .\myCert.cer -OutputDirectory .\newFolder -Converts a PKCS7 formatted certificate to non-PKCS7 format with .crt extension -``` - -## PARAMETERS - -### -Path -Path to PKCS7 formatted certificate file - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OutputDirectory -Output directory path - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: "$HOME\Desktop" -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None. -## OUTPUTS - -### None. -## NOTES -General notes - -## RELATED LINKS +# ConvertFrom-PKCS7 + +## SYNOPSIS +Convert PKCS7 formatted certificate + +## SYNTAX + +``` +ConvertFrom-PKCS7 [-Path] [[-OutputDirectory] ] [] +``` + +## DESCRIPTION +Convert PKCS7 formatted certificate to non-PKCS7 format + +## EXAMPLES + +### EXAMPLE 1 +``` +ConvertFrom-PKCS7 -Path .\myCert.cer -OutputDirectory .\newFolder +Converts a PKCS7 formatted certificate to non-PKCS7 format with .crt extension +``` + +## PARAMETERS + +### -Path +Path to PKCS7 formatted certificate file + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OutputDirectory +Output directory path + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: "$HOME\Desktop" +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None. +## OUTPUTS + +### None. +## NOTES +General notes + +## RELATED LINKS diff --git a/Documentation/ConvertTo-PEM.md b/Documentation/ConvertTo-PEM.md index f4b45b7..24a04cf 100644 --- a/Documentation/ConvertTo-PEM.md +++ b/Documentation/ConvertTo-PEM.md @@ -1,82 +1,82 @@ -# ConvertTo-PEM - -## SYNOPSIS -Convert PFX/P12 file to PEM file - -## SYNTAX - -``` -ConvertTo-PEM [-PFX] [[-OutputDirectory] ] [-Password] [] -``` - -## DESCRIPTION -Convert PFX/P12 file to PEM file including private key - -## EXAMPLES - -### EXAMPLE 1 -``` -ConvertTo-PEM -PFX .\myCert.pfx -OutputDirectory .\newFolder -Password $pw -Converts myCert.pfx to myCert.pem exposing all certificate details in plain text -``` - -## PARAMETERS - -### -PFX -Path to PFX file - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OutputDirectory -Path to plain text output directory - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: "$HOME\Desktop" -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Password -Password to PFX file - -```yaml -Type: SecureString -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None. -## OUTPUTS - -### None. -## NOTES -General notes - -## RELATED LINKS +# ConvertTo-PEM + +## SYNOPSIS +Convert PFX/P12 file to PEM file + +## SYNTAX + +``` +ConvertTo-PEM [-PFX] [[-OutputDirectory] ] [-Password] [] +``` + +## DESCRIPTION +Convert PFX/P12 file to PEM file including private key + +## EXAMPLES + +### EXAMPLE 1 +``` +ConvertTo-PEM -PFX .\myCert.pfx -OutputDirectory .\newFolder -Password $pw +Converts myCert.pfx to myCert.pem exposing all certificate details in plain text +``` + +## PARAMETERS + +### -PFX +Path to PFX file + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OutputDirectory +Path to plain text output directory + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: "$HOME\Desktop" +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Password +Password to PFX file + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None. +## OUTPUTS + +### None. +## NOTES +General notes + +## RELATED LINKS diff --git a/Documentation/Export-CertificateData.md b/Documentation/Export-CertificateData.md index 6f88c0c..6b6fa8d 100644 --- a/Documentation/Export-CertificateData.md +++ b/Documentation/Export-CertificateData.md @@ -1,87 +1,87 @@ -# Export-CertificateData - -## SYNOPSIS -Short description - -## SYNTAX - -``` -Export-CertificateData [-Path] [[-OutputDirectory] ] [-Data] [] -``` - -## DESCRIPTION -Long description - -## EXAMPLES - -### EXAMPLE 1 -``` -Export-CertificateData -Path C:\cert.pem -Data Chain -Export the certificate chain for SSL certificate -``` - -## PARAMETERS - -### -Path -Path to PEM file - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OutputDirectory -Output directory for Certificate Data - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: "$HOME\Desktop" -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Data -Data to export - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None. -## OUTPUTS - -### None. -## NOTES -Name: Export-CertificateData -Author: Justin Johns -Version: 0.1.0 | Last Edit: 2022-09-30 -- 0.1.0 - Initial version -Comments: \ -General notes: - -## RELATED LINKS +# Export-CertificateData + +## SYNOPSIS +Short description + +## SYNTAX + +``` +Export-CertificateData [-Path] [[-OutputDirectory] ] [-Data] [] +``` + +## DESCRIPTION +Long description + +## EXAMPLES + +### EXAMPLE 1 +``` +Export-CertificateData -Path C:\cert.pem -Data Chain +Export the certificate chain for SSL certificate +``` + +## PARAMETERS + +### -Path +Path to PEM file + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OutputDirectory +Output directory for Certificate Data + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: "$HOME\Desktop" +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Data +Data to export + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None. +## OUTPUTS + +### None. +## NOTES +Name: Export-CertificateData +Author: Justin Johns +Version: 0.1.0 | Last Edit: 2022-09-30 +- 0.1.0 - Initial version +Comments: \ +General notes: + +## RELATED LINKS diff --git a/Documentation/Export-PFX.md b/Documentation/Export-PFX.md index bb47cf0..be2b027 100644 --- a/Documentation/Export-PFX.md +++ b/Documentation/Export-PFX.md @@ -1,144 +1,144 @@ -# Export-PFX - -## SYNOPSIS -Export PFX file - -## SYNTAX - -``` -Export-PFX [[-OutputDirectory] ] [-Password] [-Key] [-SignedCSR] - [[-RootCA] ] [[-IntermediateCA] ] [-WindowsCompatible] [] -``` - -## DESCRIPTION -Export PFX file from completed CSR, private key, and certificate trust chain - -## EXAMPLES - -### EXAMPLE 1 -``` -Export-PFX -Password $secStr -Key .\key.key - SignedCSR .\cert.crt -RootCA .\root.crt -Creates and exports PFX file from private key, signed certificate, and root CA -``` - -## PARAMETERS - -### -OutputDirectory -Output directory for new PFX file - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: "$HOME\Desktop" -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Password -Password used to protect exported PFX file - -```yaml -Type: SecureString -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Key -Path to private key file - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SignedCSR -Path to CA-signed certificate request - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RootCA -Path to root CA public certificate - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IntermediateCA -Path to intermediate CA public certificate - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WindowsCompatible -Export using PBE-SHA1-3DES algorithm - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None. -## OUTPUTS - -### System.Object. -## NOTES -General notes -https://man.openbsd.org/openssl.1 - -## RELATED LINKS +# Export-PFX + +## SYNOPSIS +Export PFX file + +## SYNTAX + +``` +Export-PFX [[-OutputDirectory] ] [-Password] [-Key] [-SignedCSR] + [[-RootCA] ] [[-IntermediateCA] ] [-WindowsCompatible] [] +``` + +## DESCRIPTION +Export PFX file from completed CSR, private key, and certificate trust chain + +## EXAMPLES + +### EXAMPLE 1 +``` +Export-PFX -Password $secStr -Key .\key.key - SignedCSR .\cert.crt -RootCA .\root.crt +Creates and exports PFX file from private key, signed certificate, and root CA +``` + +## PARAMETERS + +### -OutputDirectory +Output directory for new PFX file + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: "$HOME\Desktop" +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Password +Password used to protect exported PFX file + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Key +Path to private key file + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignedCSR +Path to CA-signed certificate request + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RootCA +Path to root CA public certificate + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IntermediateCA +Path to intermediate CA public certificate + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WindowsCompatible +Export using PBE-SHA1-3DES algorithm + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None. +## OUTPUTS + +### System.Object. +## NOTES +General notes +https://man.openbsd.org/openssl.1 + +## RELATED LINKS diff --git a/Documentation/Get-CSRData.md b/Documentation/Get-CSRData.md index f9e7e3a..bb3e363 100644 --- a/Documentation/Get-CSRData.md +++ b/Documentation/Get-CSRData.md @@ -1,52 +1,52 @@ -# Get-CSRData - -## SYNOPSIS -Confirm CSR - -## SYNTAX - -``` -Get-CSRData [-CSR] [] -``` - -## DESCRIPTION -Confirm/validate details of certificate signing request (CSR) - -## EXAMPLES - -### EXAMPLE 1 -``` - -Explanation of what the example does -``` - -## PARAMETERS - -### -CSR -Path to certificate signing request (CSR) - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String. -## OUTPUTS - -### System.Object. -## NOTES -General notes - -## RELATED LINKS +# Get-CSRData + +## SYNOPSIS +Confirm CSR + +## SYNTAX + +``` +Get-CSRData [-CSR] [] +``` + +## DESCRIPTION +Confirm/validate details of certificate signing request (CSR) + +## EXAMPLES + +### EXAMPLE 1 +``` + +Explanation of what the example does +``` + +## PARAMETERS + +### -CSR +Path to certificate signing request (CSR) + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String. +## OUTPUTS + +### System.Object. +## NOTES +General notes + +## RELATED LINKS diff --git a/Documentation/Get-CertificateData.md b/Documentation/Get-CertificateData.md index 869b711..25bb561 100644 --- a/Documentation/Get-CertificateData.md +++ b/Documentation/Get-CertificateData.md @@ -1,52 +1,52 @@ -# Get-CertificateData - -## SYNOPSIS -Get x509 certificate details - -## SYNTAX - -``` -Get-CertificateData [-Path] [] -``` - -## DESCRIPTION -Get x509 certificate details - -## EXAMPLES - -### EXAMPLE 1 -``` - -Explanation of what the example does -``` - -## PARAMETERS - -### -Path -Path to x509 certificate file - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String. -## OUTPUTS - -### System.Object. -## NOTES -General notes - -## RELATED LINKS +# Get-CertificateData + +## SYNOPSIS +Get x509 certificate details + +## SYNTAX + +``` +Get-CertificateData [-Path] [] +``` + +## DESCRIPTION +Get x509 certificate details + +## EXAMPLES + +### EXAMPLE 1 +``` + +Explanation of what the example does +``` + +## PARAMETERS + +### -Path +Path to x509 certificate file + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String. +## OUTPUTS + +### System.Object. +## NOTES +General notes + +## RELATED LINKS diff --git a/Documentation/Get-RemoteSSLCertificate.md b/Documentation/Get-RemoteSSLCertificate.md index 4080903..f5f174d 100644 --- a/Documentation/Get-RemoteSSLCertificate.md +++ b/Documentation/Get-RemoteSSLCertificate.md @@ -1,75 +1,75 @@ -# Get-RemoteSSLCertificate - -## SYNOPSIS -Get remote SSL certificate - -## SYNTAX - -``` -Get-RemoteSSLCertificate [-ComputerName] [[-Port] ] [] -``` - -## DESCRIPTION -Get remote SSL certificate - -## EXAMPLES - -### EXAMPLE 1 -``` ---- Example 1: Get remote SSL certificate --- -PS C:\> Get-RemoteSSLCertificate -ComputerName "www.microsoft.com" -Get the SSL certificate for www.microsoft.com -``` - ---- Example 2: Get certificate from multipel sites --- -PS C:\\\> $sites = @('site1.com', 'www.site2.com', 'site3.com', 'www.site4.com') -PS C:\\\> Get-RemoteSSLCertificate -ComputerName $sites | Select-Object NotBefore, NotAfter, Subject -The first command creates an array of multiple websites. The second commands tests each site and returns the expiry info - -## PARAMETERS - -### -ComputerName -Target Computer System - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Port -TCP Port - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: 443 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String. -## OUTPUTS - -### System.Object. -## NOTES -General notes -Original code from: https://gist.github.com/jstangroome/5945820 -https://docs.microsoft.com/en-us/archive/blogs/parallel_universe_-_ms_tech_blog/reading-a-certificate-off-a-remote-ssl-server-for-troubleshooting-with-powershell - -## RELATED LINKS +# Get-RemoteSSLCertificate + +## SYNOPSIS +Get remote SSL certificate + +## SYNTAX + +``` +Get-RemoteSSLCertificate [-ComputerName] [[-Port] ] [] +``` + +## DESCRIPTION +Get remote SSL certificate + +## EXAMPLES + +### EXAMPLE 1 +``` +--- Example 1: Get remote SSL certificate --- +PS C:\> Get-RemoteSSLCertificate -ComputerName "www.microsoft.com" +Get the SSL certificate for www.microsoft.com +``` + +--- Example 2: Get certificate from multipel sites --- +PS C:\\\> $sites = @('site1.com', 'www.site2.com', 'site3.com', 'www.site4.com') +PS C:\\\> Get-RemoteSSLCertificate -ComputerName $sites | Select-Object NotBefore, NotAfter, Subject +The first command creates an array of multiple websites. The second commands tests each site and returns the expiry info + +## PARAMETERS + +### -ComputerName +Target Computer System + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Port +TCP Port + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: 443 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String. +## OUTPUTS + +### System.Object. +## NOTES +General notes +Original code from: https://gist.github.com/jstangroome/5945820 +https://docs.microsoft.com/en-us/archive/blogs/parallel_universe_-_ms_tech_blog/reading-a-certificate-off-a-remote-ssl-server-for-troubleshooting-with-powershell + +## RELATED LINKS diff --git a/Documentation/New-CertificateSigningRequest.md b/Documentation/New-CertificateSigningRequest.md index b7612f4..9d57e6e 100644 --- a/Documentation/New-CertificateSigningRequest.md +++ b/Documentation/New-CertificateSigningRequest.md @@ -1,252 +1,253 @@ -# New-CertificateSigningRequest - -## SYNOPSIS -Generate new CSR and Private key file - -## SYNTAX - -### __conf (Default) -``` -New-CertificateSigningRequest [-OutputDirectory ] [-Days ] -ConfigFile [-WhatIf] - [-Confirm] [] -``` - -### __input -``` -New-CertificateSigningRequest [-OutputDirectory ] [-Days ] -CommonName - [-Country ] [-State ] [-Locality ] [-Organization ] - [-OrganizationalUnit ] [-Email ] [-SubjectAlternativeName ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -Generate new CSR and Private key file - -## EXAMPLES - -### EXAMPLE 1 -``` -New-CertificateSigningRequest -CommonName www.myDomain.com -Creates a new CSR and private key for www.myDomain.com -``` - -## PARAMETERS - -### -OutputDirectory -Output directory for CSR and key file - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: "$HOME\Desktop" -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Days -Validity period in days (default is 365) - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: 365 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConfigFile -Path to configuration template file - -```yaml -Type: String -Parameter Sets: __conf -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CommonName -Common Name (CN) - -```yaml -Type: String -Parameter Sets: __input -Aliases: CN - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Country -Country Name (C) - -```yaml -Type: String -Parameter Sets: __input -Aliases: C - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -State -State or Province Name (ST) - -```yaml -Type: String -Parameter Sets: __input -Aliases: ST - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Locality -Locality Name (L) - -```yaml -Type: String -Parameter Sets: __input -Aliases: L - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Organization -Organization Name (O) - -```yaml -Type: String -Parameter Sets: __input -Aliases: O - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OrganizationalUnit -Organizational Unit Name (OU) - -```yaml -Type: String -Parameter Sets: __input -Aliases: OU - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Email -Email Address - -```yaml -Type: String -Parameter Sets: __input -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubjectAlternativeName -Subject Alternative Name (SAN) - -```yaml -Type: String[] -Parameter Sets: __input -Aliases: SAN - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None. -## OUTPUTS - -### System.Object. -## NOTES -Name: New-CertificateSigningRequest -Author: Justin Johns -Version: 0.2.0 | Last Edit: 2024-03-08 -- 0.2.0 - (2024-03-08) Fixed SupportsShouldProcess, updated SAN input, renamed function -- 0.1.1 - (2022-06-20) Added SupportsShouldProcess -- 0.1.0 - Initial versions -General notes -Example commands -openssl req -newkey rsa:2048 -sha256 -keyout PRIVATEKEY.key -out MYCSR.csr -subj "/C=US/ST=CA/L=Redlands/O=Esri/CN=myDomain.com" -openssl req -new -newkey rsa:2048 -nodes -sha256 -out company_san.csr -keyout company_san.key -config req.conf - -## RELATED LINKS +# New-CertificateSigningRequest + +## SYNOPSIS +Generate new CSR and Private key file + +## SYNTAX + +### __conf (Default) +``` +New-CertificateSigningRequest [-OutputDirectory ] [-Days ] -ConfigFile [-WhatIf] + [-Confirm] [] +``` + +### __input +``` +New-CertificateSigningRequest [-OutputDirectory ] [-Days ] -CommonName + [-Country ] [-State ] [-Locality ] [-Organization ] + [-OrganizationalUnit ] [-Email ] [-SubjectAlternativeName ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Generate new CSR and Private key file + +## EXAMPLES + +### EXAMPLE 1 +``` +New-CertificateSigningRequest -CommonName www.myDomain.com +Creates a new CSR and private key for www.myDomain.com +``` + +## PARAMETERS + +### -OutputDirectory +Output directory for CSR and key file + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: "$HOME\Desktop" +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Days +Validity period in days (default is 365) + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 365 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigFile +Path to configuration template file + +```yaml +Type: String +Parameter Sets: __conf +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CommonName +Common Name (CN) + +```yaml +Type: String +Parameter Sets: __input +Aliases: CN + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Country +Country Name (C) + +```yaml +Type: String +Parameter Sets: __input +Aliases: C + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State +State or Province Name (ST) + +```yaml +Type: String +Parameter Sets: __input +Aliases: ST + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Locality +Locality Name (L) + +```yaml +Type: String +Parameter Sets: __input +Aliases: L + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Organization +Organization Name (O) + +```yaml +Type: String +Parameter Sets: __input +Aliases: O + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrganizationalUnit +Organizational Unit Name (OU) + +```yaml +Type: String +Parameter Sets: __input +Aliases: OU + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Email +Email Address + +```yaml +Type: String +Parameter Sets: __input +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubjectAlternativeName +Subject Alternative Name (SAN) + +```yaml +Type: String[] +Parameter Sets: __input +Aliases: SAN + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None. +## OUTPUTS + +### System.Object. +## NOTES +Name: New-CertificateSigningRequest +Author: Justin Johns +Version: 0.2.1 | Last Edit: 2024-04-14 +- 0.2.1 - (2024-04-14) Fixed bug +- 0.2.0 - (2024-03-08) Fixed SupportsShouldProcess, updated SAN input, renamed function +- 0.1.1 - (2022-06-20) Added SupportsShouldProcess +- 0.1.0 - Initial versions +General notes +Example commands +openssl req -newkey rsa:2048 -sha256 -keyout PRIVATEKEY.key -out MYCSR.csr -subj "/C=US/ST=CA/L=Redlands/O=Esri/CN=myDomain.com" +openssl req -new -newkey rsa:2048 -nodes -sha256 -out company_san.csr -keyout company_san.key -config req.conf + +## RELATED LINKS diff --git a/Documentation/New-SelfSignedCertificate.md b/Documentation/New-SelfSignedCertificate.md index d7cbef4..117740a 100644 --- a/Documentation/New-SelfSignedCertificate.md +++ b/Documentation/New-SelfSignedCertificate.md @@ -1,277 +1,249 @@ -# New-SelfSignedCertificate - -## SYNOPSIS -Generate new self-signed certificate - -## SYNTAX - -### __conf (Default) -``` -New-SelfSignedCertificate [-OutputDirectory ] [-Days ] -ConfigFile [-WhatIf] - [-Confirm] [] -``` - -### __input -``` -New-SelfSignedCertificate [-OutputDirectory ] [-Days ] -CommonName [-Country ] - [-State ] [-Locality ] [-Organization ] [-OrganizationalUnit ] - [-Email ] [-SAN1 ] [-SAN2 ] [-SAN3 ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Generate new self-signed certificate with openssl - -## EXAMPLES - -### EXAMPLE 1 -``` -New-SelfSignedCertificate -Explanation of what the example does -``` - -## PARAMETERS - -### -OutputDirectory -Output directory for CSR and key file - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: "$HOME\Desktop" -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Days -Validity period in days (default is 365) - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: 365 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConfigFile -Path to configuration template file - -```yaml -Type: String -Parameter Sets: __conf -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CommonName -Common Name (CN) - -```yaml -Type: String -Parameter Sets: __input -Aliases: CN - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Country -Country Name (C) - -```yaml -Type: String -Parameter Sets: __input -Aliases: C - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -State -State or Province Name (ST) - -```yaml -Type: String -Parameter Sets: __input -Aliases: ST - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Locality -Locality Name (L) - -```yaml -Type: String -Parameter Sets: __input -Aliases: L - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Organization -Organization Name (O) - -```yaml -Type: String -Parameter Sets: __input -Aliases: O - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OrganizationalUnit -Organizational Unit Name (OU) - -```yaml -Type: String -Parameter Sets: __input -Aliases: OU - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Email -Email Address - -```yaml -Type: String -Parameter Sets: __input -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SAN1 -Subject Alternative Name (SAN) 1 - -```yaml -Type: String -Parameter Sets: __input -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SAN2 -Subject Alternative Name (SAN) 2 - -```yaml -Type: String -Parameter Sets: __input -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SAN3 -Subject Alternative Name (SAN) 3 - -```yaml -Type: String -Parameter Sets: __input -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None. -## OUTPUTS - -### System.Object. -## NOTES -Name: New-SelfSignedCertificate -Author: Justin Johns -Version: 0.1.1 | Last Edit: 2022-04-13 -- Renamed output template file -Comments: \ -General notes - -## RELATED LINKS +# New-SelfSignedCertificate + +## SYNOPSIS +Generate new self-signed certificate + +## SYNTAX + +### __conf (Default) +``` +New-SelfSignedCertificate [-OutputDirectory ] [-Days ] -ConfigFile [-WhatIf] + [-Confirm] [] +``` + +### __input +``` +New-SelfSignedCertificate [-OutputDirectory ] [-Days ] -CommonName [-Country ] + [-State ] [-Locality ] [-Organization ] [-OrganizationalUnit ] + [-Email ] [-SubjectAlternativeName ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Generate new self-signed certificate with openssl + +## EXAMPLES + +### EXAMPLE 1 +``` +New-SelfSignedCertificate -CommonName myDomain.com +Generates a new self-signed certificate for myDomain.com +``` + +## PARAMETERS + +### -OutputDirectory +Output directory for CSR and key file + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: "$HOME\Desktop" +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Days +Validity period in days (default is 365) + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 365 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigFile +Path to configuration template file + +```yaml +Type: String +Parameter Sets: __conf +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CommonName +Common Name (CN) + +```yaml +Type: String +Parameter Sets: __input +Aliases: CN + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Country +Country Name (C) + +```yaml +Type: String +Parameter Sets: __input +Aliases: C + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State +State or Province Name (ST) + +```yaml +Type: String +Parameter Sets: __input +Aliases: ST + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Locality +Locality Name (L) + +```yaml +Type: String +Parameter Sets: __input +Aliases: L + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Organization +Organization Name (O) + +```yaml +Type: String +Parameter Sets: __input +Aliases: O + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrganizationalUnit +Organizational Unit Name (OU) + +```yaml +Type: String +Parameter Sets: __input +Aliases: OU + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Email +Email Address + +```yaml +Type: String +Parameter Sets: __input +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubjectAlternativeName +Subject Alternative Name (SAN) + +```yaml +Type: String[] +Parameter Sets: __input +Aliases: SAN + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None. +## OUTPUTS + +### System.Object. +## NOTES +Name: New-SelfSignedCertificate +Author: Justin Johns +Version: 0.2.0 | Last Edit: 2024-04-14 +- 0.2.0 - (2024-04-14) Fixed SupportsShouldProcess and updated SAN input +- 0.1.1 - (2022-04-13) Renamed output template file +- 0.1.0 - Initial versions +Comments: \ +General notes + +## RELATED LINKS diff --git a/Documentation/Test-Cipher.md b/Documentation/Test-Cipher.md index 0f48392..56fdef1 100644 --- a/Documentation/Test-Cipher.md +++ b/Documentation/Test-Cipher.md @@ -1,87 +1,87 @@ -# Test-Cipher - -## SYNOPSIS -Test cipher suites - -## SYNTAX - -``` -Test-Cipher [-ComputerName] [[-Port] ] [-Cipher] [] -``` - -## DESCRIPTION -Test cipher suites - -## EXAMPLES - -### EXAMPLE 1 -``` -Test-Cipher -ComputerName myServer.com -Port 443 -Cipher 'ECDHE-RSA-AES128-GCM-SHA256' -Uses openssl to test connecting to myServer.com over port 443 using the cipher 'ECDHE-RSA-AES128-GCM-SHA256' -``` - -## PARAMETERS - -### -ComputerName -Target Computer System - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Port -TCP Port - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: 443 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Cipher -Cipher - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None. -## OUTPUTS - -### None. -## NOTES -Name: Test-Cipher -Author: Justin Johns -Version: 0.1.0 | Last Edit: 2023-12-21 -- 0.1.0 - Initial version -Comments: -https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies - -## RELATED LINKS +# Test-Cipher + +## SYNOPSIS +Test cipher suites + +## SYNTAX + +``` +Test-Cipher [-ComputerName] [[-Port] ] [-Cipher] [] +``` + +## DESCRIPTION +Test cipher suites + +## EXAMPLES + +### EXAMPLE 1 +``` +Test-Cipher -ComputerName myServer.com -Port 443 -Cipher 'ECDHE-RSA-AES128-GCM-SHA256' +Uses openssl to test connecting to myServer.com over port 443 using the cipher 'ECDHE-RSA-AES128-GCM-SHA256' +``` + +## PARAMETERS + +### -ComputerName +Target Computer System + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Port +TCP Port + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: 443 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Cipher +Cipher + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None. +## OUTPUTS + +### None. +## NOTES +Name: Test-Cipher +Author: Justin Johns +Version: 0.1.0 | Last Edit: 2023-12-21 +- 0.1.0 - Initial version +Comments: +https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies + +## RELATED LINKS diff --git a/Documentation/Test-Protocol.md b/Documentation/Test-Protocol.md index 5ef6300..f2dc299 100644 --- a/Documentation/Test-Protocol.md +++ b/Documentation/Test-Protocol.md @@ -1,86 +1,86 @@ -# Test-Protocol - -## SYNOPSIS -Test TLS protocol - -## SYNTAX - -``` -Test-Protocol [-ComputerName] [[-Port] ] [-Protocol] [] -``` - -## DESCRIPTION -Test TLS protocol - -## EXAMPLES - -### EXAMPLE 1 -``` -Test-Protocol -ComputerName mySever.com -Port 443 -Protocl 'TLS 1.2' -Uses openssl to test connecting to myServer.com over port 443 using TLS 1.2 -``` - -## PARAMETERS - -### -ComputerName -Target Computer System - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Port -TCP Port - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: 443 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Protocol -Protocol versions - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None. -## OUTPUTS - -### None. -## NOTES -Name: Test-Protocol -Author: Justin Johns -Version: 0.1.0 | Last Edit: 2023-12-21 -- 0.1.0 - Initial version -Comments: - -## RELATED LINKS +# Test-Protocol + +## SYNOPSIS +Test TLS protocol + +## SYNTAX + +``` +Test-Protocol [-ComputerName] [[-Port] ] [-Protocol] [] +``` + +## DESCRIPTION +Test TLS protocol + +## EXAMPLES + +### EXAMPLE 1 +``` +Test-Protocol -ComputerName mySever.com -Port 443 -Protocl 'TLS 1.2' +Uses openssl to test connecting to myServer.com over port 443 using TLS 1.2 +``` + +## PARAMETERS + +### -ComputerName +Target Computer System + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Port +TCP Port + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: 443 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Protocol +Protocol versions + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None. +## OUTPUTS + +### None. +## NOTES +Name: Test-Protocol +Author: Justin Johns +Version: 0.1.0 | Last Edit: 2023-12-21 +- 0.1.0 - Initial version +Comments: + +## RELATED LINKS diff --git a/Documentation/Test-SSLProtocol.md b/Documentation/Test-SSLProtocol.md index d406a8f..a9d18e7 100644 --- a/Documentation/Test-SSLProtocol.md +++ b/Documentation/Test-SSLProtocol.md @@ -1,70 +1,70 @@ -# Test-SSLProtocol - -## SYNOPSIS -Test SSL protcols - -## SYNTAX - -``` -Test-SSLProtocol [-ComputerName] [[-Port] ] [] -``` - -## DESCRIPTION -Test remote website for SSL protcols - -## EXAMPLES - -### EXAMPLE 1 -``` -Test-SSLProtocl -ComputerName 'www.mysite.com' -Tests www.mysite.com for access using various SSL/TLS protocols -``` - -## PARAMETERS - -### -ComputerName -Target Computer System - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Port -TCP Port - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: 443 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String. -## OUTPUTS - -### System.Object. -## NOTES -General notes -Original code from: -https://dscottraynsford.wordpress.com/2016/12/24/test-website-ssl-certificates-continuously-with-powershell-and-pester/ -https://www.sysadmins.lv/blog-en/test-web-server-ssltls-protocol-support-with-powershell.aspx - -## RELATED LINKS +# Test-SSLProtocol + +## SYNOPSIS +Test SSL protcols + +## SYNTAX + +``` +Test-SSLProtocol [-ComputerName] [[-Port] ] [] +``` + +## DESCRIPTION +Test remote website for SSL protcols + +## EXAMPLES + +### EXAMPLE 1 +``` +Test-SSLProtocl -ComputerName 'www.mysite.com' +Tests www.mysite.com for access using various SSL/TLS protocols +``` + +## PARAMETERS + +### -ComputerName +Target Computer System + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Port +TCP Port + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: 443 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String. +## OUTPUTS + +### System.Object. +## NOTES +General notes +Original code from: +https://dscottraynsford.wordpress.com/2016/12/24/test-website-ssl-certificates-continuously-with-powershell-and-pester/ +https://www.sysadmins.lv/blog-en/test-web-server-ssltls-protocol-support-with-powershell.aspx + +## RELATED LINKS diff --git a/Documentation/index.md b/Documentation/index.md index d785502..a961f36 100644 --- a/Documentation/index.md +++ b/Documentation/index.md @@ -4,7 +4,32 @@ Module wraps Openssl for creating SSL certificate signing requests and other com ## Prerequisites -Openssl +This module requires Openssl. +To install Openssl on Windows using either winget or chocolatey, use the code below. + +```pwsh +# USING CHOCOLATEY +choco install openssl + +# USING WINGET +winget install --Id ShiningLight.OpenSSL +``` + +To install Openssl on mac OS using Homebrew, use the code below. + +```sh +brew install openssl@3 +``` + +To install Openssl on Debian-based Linux, use the follow code. + +```sh +# UPDATE PACKAGE LIST +sudo apt update + +# INSTALL OPENSSL +sudo ap install openssl -y +``` ## Updates diff --git a/README.md b/README.md index d785502..8908d04 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,32 @@ Module wraps Openssl for creating SSL certificate signing requests and other com ## Prerequisites -Openssl +This module requires Openssl. +To install Openssl on Windows using either winget or chocolatey, use the code below. + +```pwsh +# USING CHOCOLATEY +choco install openssl + +# USING WINGET +winget install --Id ShiningLight.OpenSSL +``` + +To install Openssl on mac OS using Homebrew, use the code below. + +```sh +brew install openssl@3 +``` + +To install Openssl on Debian-based Linux, use the follow code. + +```sh +# UPDATE PACKAGE LIST +sudo apt update + +# INSTALL OPENSSL +sudo apt install openssl -y +``` ## Updates