Showing posts with label powershell. Show all posts
Showing posts with label powershell. Show all posts

How can I see what certificates are installed on a Windows computer with PowerShell

Using PowerShell to view certificates is easy. PowerShell has a provider that exposes the certificates store which is part of the pki and security modules, which are loaded automatically as long as you’re on version 3 or greater. You do not need to manually load the modules, they auto-load from PowerShell v3 and above.
To view the certificates in the local users personal certificate store/local machine store I would use the following:  
#Change to the location of the personal certificates
Set-Location Cert:\CurrentUser\My

#Change to the location of the local machine certificates
Set-Location Cert:\LocalMachine\My

#Get the installed certificates in that location
Get-ChildItem | Format-Table Subject, FriendlyName, Thumbprint -AutoSize

A quick way to delete all the bin and obj folders in your solution

Something like this is a cinch with Powershell

1. open the powershell command prompt
2. enter the command get-childitem -path "C:\sourceCode\MySolution" -recurse -include obj,bin | remove-item -force -recurse

Handy for ensuring your solution will build from scratch with no unreferenced/circular referenced assemblies or for deleting dlls that have become locked which sometimes happens. Same principle could easily be applied to the asp.net cache.