Avatar of Mike
Mike
Flag for United States of America asked on

Need Help creating a Power-shell Script

Greeting Experts,

Can somebody help me create a PowerShell script to clear cached passwords in a Windows Operating System (7/10)....
PowershellVB ScriptWindows OS

Avatar of undefined
Last Comment
Mike

8/22/2022 - Mon
Michael Pfister

Have you seen this? It describes a simple batch file to perform the clear:

https://blogs.technet.microsoft.com/rmilne/2019/01/11/script-to-clear-credman/

Of course this can be converted to a PowerShell if required
Mike

ASKER
do you have a sample script ...  like removing all creds from the cache.
ASKER CERTIFIED SOLUTION
Michael Pfister

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
aravind anche

Get-CachedCredential| Where-Object{$_.User -match"admin-"} | %{Remove-CachedCredential $_.Target}

Open in new window



this will clear for admin, use similar
Your help has saved me hundreds of hours of internet surfing.
fblack61
Mike

ASKER
I was mainly looking to clear all cached creds... Michael Pfister it works perfectly ... thx..... aravind anche, thank you for the suggestion...