Coder Social home page Coder Social logo

verifysslexpiry's Introduction

PowerShell verifySSLExpiry

Powershell script to verify SSL Expiry Date of given sites

  • Check multiple sites at once
  • Send report e-mail when SSL expires within X days

Installation

Install PowerShell. Download this PowerShell Module and import it

$ git clone https://github.com/arnaudgandibleux/verifySSLExpiry.git
$ Import-Module ./verifySSLExpiry.psm1

Usage

Open PowerShell and run

$ verifySSLExpiry -sites SITE 1, SITE 2, SITE 3,...,SITE X

Example

Use URL without specifying port or protocol. Ex. Use gandibleux.eu instead of https://gandibleux.eu

$ verifySSLExpiry -sites gandibleux.eu

Send mail report

To send a mail with the results of the validation, you first need to configure mail.

Fill in the following parameters with the pwsh module (verifySSLExpiry.psm1):

  • $smtp_user
  • $smtp_server
  • $smtp_port
  • $from_email
  • $to_email

Run the following command to save the SMTP password

$ save_smtp_credentials

Fill in the username and password which will be used for the smtp server. The password will get saved in the file: smtp_password.txt It's not saved plain text, but be carefull as the password can easily be retrieved within PowerShell. Recommendation: Use a dedicated and unique password for this

Test your email configuration

$ test_email

Usage of mail

Specify the mail_report flag. Use the value 1 to enable mail.

$ verifySSLExpiry -sites SITE 1, SITE 2, SITE 3,...,SITE X -mail_report 1

Development

See any bugs or do you want to improve it? Feel free to contribute!

verifysslexpiry's People

Contributors

arnaudgandibleux avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.