Tests remote web server SSL certificate.
Test-WebServerSSL [-URL] <String> [[-Port] <Int32>] [[-Proxy] <WebProxy>] [[-Timeout] <Int32>] [-UseUserContext] [<CommonParameters>]
Tests remote web server SSL certificate. The command connects to the specified web server address, establishes SSL tunnel, retrieves and examines returned certificate.
Specifies a web server address to connect. The address MUST NOT contain a protocol prefix (https://). Only host names are allowed.
Required? | True |
Position? | 0 |
Default value | |
Accept pipeline input? | true (ByValue) |
Accept wildcard characters? | False |
Specifies the SSL port to connect. by default, port 443 is used.
Required? | False |
Position? | 1 |
Default value | 443 |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Specifies a proxy address (including protocol prefix, host name and connection port) if necessary.
Required? | False |
Position? | 2 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Specifies the connection timeout in milliseconds. By default 15 seconds (15000 milliseconds) timeout is used.
Required? | False |
Position? | 3 |
Default value | 15000 |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Specifies whether to build chain against user store. By default, certificate chain MUST be ended by a Root CA certificate that is stored in the Trusted Root CAs container in Local Machine store.
Required? | False |
Position? | named |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, InformationAction, InformationVariable,
WarningAction, WarningVariable, OutBuffer, PipelineVariable and OutVariable.
For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
None.
Author: Vadims Podans
Blog: https://www.sysadmins.lv
PS C:\> Test-WebServerSSL -URL login.live.com
The command initiates the SSL connection to 'https://login.live.com' on port 443 and examines SSL certificate. Actual SSL certificate is added to the returned object.
PS C:\> Test-WebServerSSL -url paypal.com -Proxy "http://proxy.company.com:8080" -Timeout 20000
This command initiates a SSL connection to 'https://paypal.com' on port 443 by using spefied proxy address and examines SSL certificate. The timeout for the connection is 20 seconds (20000 milliseconds). Actual SSL certificate is added to the returned object.