Remove a user’s credentials from Secure Store

As a developer, when we are working with Secure Store Service Applications and storing and retrieving credentials from Secure Store Application programmatically, sometimes we need to clear correct credentials stored so we can re-run some test cases. So how to achieve this without changing anything in your code or without deleting and recreating Application within Secure Store? Well, its not so difficult. After some trails I was able to create a small powershell scrip to do this for the logged-in user. Following is the extract of the powershell method that I used for the same: