How to find certificates that are expiring on your server using PowerShell– Part 1
How to find certificates that are expiring on your server using PowerShell– Part 1
So, I’m often asked how to quickly find certificates that are about to expire so that they can be replaced. Here is a quick way to list the days remaining before the certificates on your server are about to expire.
PS> Get-ChildItem -Path Cert:\LocalMachine\My | Select-Object -Property PSComputerName, Subject, @{n=’ExpireInDays’;e={($_.notafter – (Get-Date)).Days}}
By adding a Where-Object filter, you can filter the list so that only certificates that are going to expire in 90 days are displayed.
PS> Get-ChildItem -Path Cert:\LocalMachine\My | Select-Object -Property PSComputerName, Subject, @{n=’ExpireInDays’;e={($_.notafter – (Get-Date)).Days}} | Where-Object {$_.ExpireInDays -lt 90}
If you have multiple servers such as a web farm, you can use PowerShell Remoting to check all your servers at once! Check out the same one-liners using PowerShell remoting Locating IIS certificates before the expire.
Pretty cool huh?
For more, read Part 2: How to find certificates that are expiring on your server using PowerShell
Knowledge is PowerShell
Jason Helmick
Director of PowerShell Technologies
Interface Technical Training
You May Also Like
Agile Methodology in Project Management
0 163 0In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management
Creating Users and Managing Passwords in Microsoft Office 365
0 706 3In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365. For instructor-led Office 365 training classes, see our course schedulle: Spike Xavier SharePoint Instructor – Interface Technical Training Phoenix, AZ 20347: Enabling and Managing Office 365
JavaScript for C# Developers – September 24, 2014
0 494 3Is JavaScript worth taking the time to learn if I’m a server-side .NET developer? How much of C# carries over to JavaScript? In this recorded video from Dan Wahlin’s webinar on September 24,2014, Dan answers these questions and more while also discussing similarities between the languages, key differences, and the future of JavaScript (ES6). If … Continue reading JavaScript for C# Developers – September 24, 2014
See what people are saying...