My company needs to activate MFA tomorrow and we need to know how to clear out all of the stored credentials in the Windows Credential Manager. The problem credential that I can't remove via Powershell is one called "SSO_POP_Device" under "Other Items".
I have a command that will remove all credentials EXCEPT the SSO_POP_Device. The code is below. I've stopped and started the CM service, which just restores what it remembered from before (still need to clear the credentials so they don't get used after MFA is active). I am aware that it can be manually removed in CM, but remember, I need a Powershell script or CMD line method of removing this for multiple users across the company. I discovered through research that this is likely tied to our Microsoft Accounts and specifically, to Office / Outlook 365.
This is the command that removes all credentials except SSO_POP_Device currently. It's pretty short.
cmdkey /list | ForEach-Object{if($_ -like "*Target:*"){cmdkey /delete:($_ -replace " ","" -replace "Target:","")}}
I would expect to be able run some Powershell or CMD line to scrub anything whatsoever from Credential Manager, regardless of where it is stored or what it's related to. Whenever I run cmdkey /list with just SSO_POP_Device remaining on the list, it returns nothing. There are no error messages except when I'm firing off random delete commands into the aether.